By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (20)

The following SAS program is submitted: %let a=cat; %macro animal; %let a=dog; %mend; %animal %put a is &a; Which one of the following is written to the SAS log? a. a is b. a is &a c. a is cat d. a is dog

By admin | August 13, 2009

SAS Certified Adv Programmer 50 Questions (19)

The following SAS program is submitted: data towns; input City $ pop year; cards; ANDOVER 75000 1998 CARY 80000 1998 ANDOVER 14000 1977 CARY 71000 1986 ; %macro a(location); data a; set towns; %if &location=UK %then %do; where city=’ANDOVER’; %end; %if &location=NC %then %do; where city=’CARY’; %end; if pop>70000; run; %mend; %a(UK) Which one of […]

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. […]