By admin | September 14, 2009

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

3 comments | Add One

  1. admin - 09/14/2009 at 1:19 pm

    C

  2. hh - 02/20/2014 at 8:03 pm

    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.

  3. hh - 02/20/2014 at 8:06 pm

    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.

Leave a Comment

Leave a Reply

Your email address will not be published.