By admin | August 14, 2009

SAS Certified Adv Programmer 50 Questions (23)

Which of the following SAS functions retrieves the value of a macro variable during DATA step execution? a. GET b. SYMGET c. %SYMGET d. &MVARNAME

By admin | August 14, 2009

SAS Certified Adv Programmer 50 Questions (22)

The following SAS program is submitted: %let day=Tuesday; %macro loop(day); %do day=2 %to 6; proc print data=sasuser.houses; where sellday=”&day”; run; %end; %put day is &day; %mend; %loop(Friday) Which one of the following is written to the log by the %PUT statement? a. day is 7 b. day is &day c. day is Friday d. day […]

By admin | August 14, 2009

SAS Certified Adv Programmer 50 Questions (21)

The following SAS program is submitted at the start of a new SAS session: %macro trans; %let type=Airplane; proc print data=sasuser.activities; where trans=”&type”; run; %location(Automobile) %put type is &type; %mend; %macro location(type); data _null_; call symput(‘type’, ‘Train’); run; %mend; %trans Which one of the following is written to the log by the %PUT statement? a. […]

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