Archive for August, 2009

By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (18)

The following SAS program is submitted: %let code=set old (keep=A B); Newvar=a || b; run; data new; &code run; proc print data=new; run; Which one of the following is the result of the above program? a. There will be errors in the log and no report. b. There will be no report and no errors […]

By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (17)

The following SAS program is submitted: %let sun=SHINE; %let shine=MOON; proc print data=weather(keep=sun shine moon); sum &&&&sun; run; Which one of the following variables is summed in the resulting report? a. sun b. MOON c. SHINE d. None, an ERROR message will be written to the log.

By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (16)

Given the following SAS data set Mylib.Mydata: Mylib.Mydata Name Animal Age Max Cat 9 Brown Dog 22 Large Pig 1 The following SAS program is submitted: data _null_; set mylib.mydata; call symput(‘animal’ || left(_n_), name); run; %let i=2; title “The value is &&animal&i”; Which one of the following does the TITLE statement resolve to? a. […]

By admin | August 12, 2009

SAS Certified Adv Programmer 50 Questions (15)

A batch (non -interactive) job is submitted on Wednesday, 20 January 1999 (SAS date 14264). The program completes the following day. The following code is the last step in the SAS program: data _null_; call symput(‘mdate’, input(“&sysdate”, date7.)); run; Which of the following is the value of the macro variable mdate? a. 14264 b. 14265 […]

By admin | August 12, 2009

SAS Certified Adv Programmer 50 Questions (14)

Which one of the following SAS programs removes the index Jobcode from the table Staff? a. proc sql; drop index jobcode from work.staff; quit; b. proc sql; delete index jobcode from work.staff; quit; c. proc sql; drop index from work.staff; quit; d. proc sql; delete index from work.staff; quit;