%macro one(input);
%two
%put the value is &date;
%mend;
%macro two;
data _null_;
call symput('date', '12SEP2008');
run;
%mend;
%let date = 31DEC2006;
%one(&date)
What is the result when the %PUT statement executes?
A.A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table.
B.A macro variable DATE with the value 31DEC2006 is retrieved from the global symbol table.
C.A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE macro.
D.A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWO macro.
Answer: A, 为什么不选D?
76.
%macro one(input);
%two
%mend;
%macro two;
data _null_;
call symputx('date', '12SEP2008', 'G');
run;
%put the value is &date;
%mend;
%let date = 31DEC2006;
%one(&date)
What is the result when the %PUT statement executes?
A.A macro variable DATE with the value 12SEP2008 is retrieved from the global symbol table.
B.A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the ONE macro.
C.A macro variable DATE with the value 12SEP2008 is retrieved from the local symbol table for the TWO macro.
D.A macro variable DATE with the value 31DEC2006 is retrieved from the local symbol table for the TWO
macro.
Answer: A
26. Given the SAS data setSASUSER.HIGHWAY:
SASUSER.HIGHWAY
STEERINGSEATBELTSPEED STATUSCOUNT
absentNo0-29serious 31
absentNo0-29not 1419absentNo30-49serious 191
absentno30-49not 2004
absentno50+serious 216
The following SAS program issubmitted:
%macro highway;
proc sql noprint;%let numgrp = 6;
select distinct status
into :group1 - :group&numgrp
from sasuser.highway;
quit;
%do i = 1 %to &numgrp;
proc print data =sasuser.highway;where status ="&&group&i" ;
run;
%end;
%mend;
%highway
How many reports are produced?
A.0
B.2
C.5
D.6
Answer: B, 为什么不选D?
请帮忙解释一下这几道题,多谢!!