MPRINTNEST System Option

Specifies whether to display the macro nesting information in the MPRINT output in the SAS log.
Valid in: Configuration fileOPTIONS windowOPTIONS statementSAS invocation
PROC OPTIONS GROUP= MACRO
Type: System option
Default: NOMPRINTNEST

Syntax

MPRINTNEST | NOMPRINTNEST

Required Arguments

MPRINTNEST
enables the macro nesting information to be displayed in the MPRINT output in the SAS log.
NOMPRINTNEST
prevents the macro nesting information from being displayed in the MPRINT output in the SAS log.

Details

MPRINTNEST enables the macro nesting information to be written to the SAS log in the MPRINT output. The MPRINTNEST output has no effect on the MPRINT output that is sent to an external file. For more information, see MFILE System Option.
The setting of MPRINTNEST does not imply the setting of MPRINT. You must set both MPRINT and MPRINTNEST in order for output (with the nesting information) to be written to the SAS log.

Example: Using MPRINTNEST System Option

The following example uses the MPRINT and MPRINTNEST options:
%macro outer;
data _null_;
     %inner
run;
%mend outer;
%macro inner;
    put %inrmost;
%mend inner;
%macro inrmost;
    'This is the text of the PUT statement'
%mend inrmost;
    options mprint mprintnest;
    %outer
Here is the output written to the SAS log using both the MPRINT option and the MPRINTNEST option:
MPRINT(OUTER):   data _null_;
MPRINT(OUTER.INNER):   put
MPRINT(OUTER.INNER.INRMOST):   'This is the text of the PUT statement'
MPRINT(OUTER.INNER):  ;
MPRINT(OUTER):   run;
This is the text of the PUT statement
NOTE: DATA statement used (Total process time):
      real time           0.10 seconds
      cpu time            0.06 seconds
      
Here is an example that uses the NOMPRINTNEST option:
%macro outer;
    data _null_;
    %inner
run;
%mend outer;
%macro inner;
    put %inrmost;
%mend inner;
%macro inrmost;
    'This is the text of the PUT statement'
%mend inrmost;
    options nomprintnest;
    %outer
Here is the output written to the SAS log using the NOMPRINTNEST option:
MPRINT(OUTER):   data _null_;
MPRINT(INNER):   put
MPRINT(INRMOST):   'This is the text of the PUT statement'
MPRINT(INNER):  ;
MPRINT(OUTER):   run;
This is the text of the PUT statement
NOTE: DATA statement used (Total process time):
      real time           0.00 seconds
      cpu time            0.01 seconds