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 is Tuesday
Topics:
SAS Adv Questions |
4 Comments »
A
A the put statement is executed when the value of the macro variable day is 7
I don’t get it. Why is it not d) day is Tuesday?
Isn’t:
%put day is &day; => day is Tuesday
%put day is &Friday; => day is 7
any variable that is created within a macro definition is a macro variable too?