
This scenario uses the Cert.Staff data set.
Write a SAS program to do the following:
- Create a new temporary SAS data set that uses Cert.Staff and store th results in Work.StaffReports.
- Select observation where WageCategory is not equal to H.
- Format the variable DOB as mmddyy10.
- Create a new variable named Raise whose value is WageRate multiplied by 3 %.
- Determine the grand total of Raise for the entire data set.
[사용 코드]
libname cert 'C:/folders/mypath/cert/';
data work.staffreports;
set cert.staff;
where wagecategory ne 'H';
format dob mmddyy10.;
raise = wagerate * 0.03;
run;
proc print data=work.staffreports;
sum raise;
run;
- 형식 mmddyy10. → . 빼먹지 않기 !!
- sum 문은 PROC PRINT step 에서 사용한다 !!

'SAS > Scenario' 카테고리의 다른 글
| Scenario 5 (0) | 2022.12.25 |
|---|---|
| Scenario 4 (0) | 2022.12.25 |
| Scenario 2 (0) | 2022.12.25 |
| Scenario 1 (0) | 2022.12.25 |
| Scenarie 10 (0) | 2022.11.06 |