-
Create the Hrd.Added data set from
Hrd.Funddrive, which contains employees' contributions to
a charity. Below is a sample of the data set.
SAS Data Set Hrd.Funddrive
LastName |
Qtr1 |
Qtr2 |
Qtr3 |
Qtr4 |
ADAMS |
18 |
18 |
20 |
20 |
ALEXANDER |
15 |
18 |
15 |
10 |
APPLE |
25 |
25 |
25 |
25 |
ARTHUR |
10 |
25 |
20 |
30 |
AVERY |
15 |
15 |
15 |
15 |
BAREFOOT |
20 |
20 |
20 |
20 |
The following steps instruct you to add an employer's supplement of 25 percent
to each employee's contribution.
-
Write an ARRAY statement to group the variables
Qtr1 through
Qtr4 for processing. Name the array contrib .
-
Write a DO loop to add the company's supplement of 25% to each employee's
quarterly contribution.
-
Submit the DATA step and correct any errors; then print the new data set.
Return here and select Next.
|