Item 62 of 63 Mark item for review
Given the following macro program
and invocation:
%macro MAKEPGM(NEWNAME, SETNAME);
data &NEWNAME;
set &SETNAME;
run;
%put ---> inside macro &NEWNAME &SETNAME;
%mend;
%MAKEPGM(WORK.NEW, SASHELP.CLASS)
%put ---> outside macro &NEWNAME &SETNAME;
Which of these choices shows the correct %PUT
statement output if the program is submitted at
the beginning of a new SAS session? Note that
other lines may be written to the SAS log by the
program but only the %PUT output is shown here.
A.
---> inside macro WORK.NEW SASHELP.CLASS
---> outside invocation WORK.NEW SASHELP.CLASS
B.
---> inside macro WORK.NEW SASHELP.CLASS
---> outside invocation &NEWNAME &SETNAME
C.
---> inside macro &NEWNAME &SETNAME
---> outside invocation WORK.NEW SASHELP.CLASS
D.
---> inside macro &NEWNAME &SETNAME
---> outside invocation &NEWNAME &SETNAME
答案是B,但是我的疑问是答案为什么不是?
---> inside macro SASHELP.CLASS SASHELP.CLASS