The solution listed
below is one example of a program that could be used to accomplish
each task within each scenario. Your code can be different, so long
as it results in the same answers.
data work.staffreports; /*#1*/
set cert.staff; /*#2*/
where WageCategory ne'H'; /*#3*/
format DOB mmddyy10.; /*#4*/
Raise=WageRate*0.03; /*#5*/
run;
proc print data=work.staffreports; /*#6*/
sum Raise; /*#7*/
run;
1 |
The DATA step creates a new data
set named Work.Staffreports.
|
2 |
The SET statement specifies the
SAS data set that you want to read from. To create Work.Staffreports,
you read from Cert.Staff.
|
3 |
The WHERE statement selects only
the observations for the values of WageCategory that do not equal
H.
|
4 |
The FORMAT statement formats the
DOB variable in the mmddyy10. format.
|
5 |
The assignment statement creates
the Raise variable. The values for Raise are assigned for each observation
by multiplying the value of WageRate by 3%.
|
6 |
The PROC PRINT step enables you
to view the contents of the new data set, Work.Staffreports.
|
7 |
The SUM statement generates a grand
total for the Raise variable.
|
Output A2.3 PROC PRINT Output of Work.Staffreports