SAS Certified Base Programmer 123 Questions (44)
The following SAS program is submitted:
data work.test; set work.staff (keep = jansales febsales marsales); array diff_sales{3} difsales1 - difsales3; array monthly{3} jansales febsales marsales; run;
Which one of the following represents the new variables that are created?
A. JANSALES, FEBSALES and MARSALES
B. MONTHLY1, MONTHLY2 and MONTHLY3
C. DIFSALES1, DIFSALES2 and DIFSALES3
D. DIFF_SALES1, DIFF_SALES2 and DIFF_SALES3
Topics:
SAS Base Questions |
3 Comments »
C
When I copy and paste above code in SAS, I get all the variables not just those in C but also A. In total I see 6 variables created in the output.
Oh I got it now.. jansales febsales marsales were already contained in the data set work.staff, so the newly created variables are indeed those under C.