By admin | August 14, 2009

SAS Certified Adv Programmer 50 Questions (25)

Which one of the following is the purpose of the %STR function? a. to extract part of a macro character value b. to treat semicolons and other selected tokens as text c. to concatenate the values of two macro variables into one d. to extract part of a macro variable based on matching criteria

By admin | August 14, 2009

SAS Certified Adv Programmer 50 Questions (24)

The following SAS program is submitted: %let type=RANCH; proc sql; create view houses as select * from sasuser.houses where style=”&type”; quit; %let type=CONDO; proc print data=houses; run; The report that is produced displays observations whose value of Style are all equal to RANCH. Which one of the following functions on the WHERE clause resolves the […]

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