Q17:
Given the SAS data set ONE:
ONE
DIVISION SALES
A 1234
A 3654
B 5678
The following SAS program is submitted;
Data _null_;
Set one;
By division;
If first.division then
Do;
%let mfirst=sales;
end;
run;
What is the value of the macro variable MFIRST when the program finishes
execution?
A. 1234
B. sales
C. 5678
D. null
我用程序跑过,确实是B. 但为什么不是C呢,想不明白。
Q80:
The following SAS program is submitted:
%let rc=Begin;
%macro test;
data out;
set sashelp.prdsale nobs = totalobs;
if totalobs > 10 then do;
%let rc = high;
end;
else do;
%let rc = low;
end;
run;
%mend;
%let rc = Before Execution;
%test
The data set SASHELP.PRDSALE has 50 observations.
What is the value of the variable RC when the macro finishes execution?
A. low
B. high
C. Begin
D. Before Execution
答案是A,我认为是B。想不明白。