General form, MPRINT
| NOMPRINT option:
OPTIONS MPRINT | NOMPRINT;
NOMPRINT
is the default setting,
and specifies that the text that is sent to the compiler when a macro
executes is not printed in the SAS log.
MPRINT
specifies that the
text that is sent to the compiler when a macro executes is printed
in the SAS log.
|
Prtlast
macro and to use the
MPRINT system option to show the SAS code that results from the macro
execution.
%macro prtlast; proc print data=&syslast (obs=5); title "Listing of &syslast data set"; run; %mend;
Prtlast
macro: data sales; price_code=1; run; options mprint; %prtlast
General form, MLOGIC
| NOMLOGIC option:
OPTIONS MLOGIC | NOMLOGIC;
NOMLOGIC
is the default setting,
and specifies that messages about macro actions are not printed to
the SAS log during macro execution.
MLOGIC
specifies that messages
about macro actions are printed to the log during macro execution.
|
Prtlast
macro.
data sales; price_code=1; run; options nomprint mlogic; %prtlast
107 %prtlast MLOGIC(PRTLAST): Beginning execution. NOTE: There were 1 observations read from the dataset WORK.SALES. NOTE: PROCEDURE PRINT used: real time 0.02 seconds cpu time 0.02 seconds MLOGIC(PRTLAST): Ending execution. |
%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;