Syntax, MPRINT system
option:
MPRINT | NOMPRINT;
MPRINT
displays the SAS statements
that are generated by macro execution. The SAS statements are useful
for debugging macros.
NOMPRINT
does not display SAS
statements that are generated by macro execution.
|
%macro prtlast; proc print data=&syslast (obs=5); title "Listing of &syslast data set"; run; %mend prtlast;
data sales; price_code=1; run; options mprint; %prtlast
Work.Sales
in the MPRINT
messages that are written to the SAS log. 101 %prtlast MPRINT(PRTLAST): proc print data=WORK.SALES (obs=5); MPRINT(PRTLAST): title "Listing of WORK.SALES"; MPRINT(PRTLAST): run; NOTE: There were 1 observations read from the dataset WORK.SALES. NOTE: PROCEDURE PRINT used: real time 0.04 seconds cpu time 0.04 seconds
Syntax, macro comment
statement:
/*comment*/;
comment
can be any message.
Like other SAS statements, each macro comment statement ends with
a semicolon.
|
%macro printit; /*The value of &syslast will be substituted appropriately*/ /* as long as a data set has been created during this session.*/ proc print data=&syslast(obs=5); /* Print only the first 5 observations */ title "Last Created Data Set Is &syslast"; run; %mend;