MLOGICNEST System Option

Specifies whether to display the macro nesting information in the MLOGIC output in the SAS log.
Valid in: Configuration fileOPTIONS windowOPTIONS statementSAS invocation
PROC OPTIONS GROUP= MACRO

LOGCONTROL

Type: System option
Default: NOMLOGICNEST
See: The SAS Log in SAS Language Reference: Concepts

Syntax

MLOGICNEST | NOMLOGICNEST

Required Arguments

MLOGICNEST
enables the macro nesting information to be displayed in the MLOGIC output in the SAS log.
NOMLOGICNEST
prevents the macro nesting information from being displayed in the MLOGIC output in the SAS log.

Details

MLOGICNEST enables the macro nesting information to be written to the SAS log in the MLOGIC output.
The setting of MLOGICNEST does not affect the output of any currently executing macro.
The setting of MLOGICNEST does not imply the setting of MLOGIC. You must set both MLOGIC and MLOGICNEST in order for output (with nesting information) to be written to the SAS log.

Example: Using MLOGICNEST System Option

The first example shows both the MLOGIC and MLOGICNEST options being set:
%macro outer;
    %put THIS IS OUTER;
    %inner;
%mend outer;
%macro inner;
    %put THIS IS INNER;
    %inrmost;
%mend inner;
%macro inrmost;
    %put THIS IS INRMOST;
%mend;
    options mlogic mlogicnest;
    %outer
Here is the MLOGIC output in the SAS log using the MLOGICNEST option:
MLOGIC(OUTER):  Beginning execution.
MLOGIC(OUTER):  %PUT THIS IS OUTER
THIS IS OUTER
MLOGIC(OUTER.INNER):  Beginning execution.
MLOGIC(OUTER.INNER): %PUT THIS IS INNER
THIS IS INNER
MLOGIC(OUTER.INNER.INRMOST):  Beginning execution.
MLOGIC(OUTER.INNER.INRMOST):  %PUT THIS IS INRMOST
THIS IS INRMOST
MLOGIC(OUTER.INNER.INRMOST): Ending execution.
MLOGIC(OUTER.INNER):  Ending execution.
MLOGIC(OUTER):  Ending execution.
The second example uses only the NOMLOGICNEST option:
 %macro outer;
     %put THIS IS OUTER;
     %inner;
 %mend outer;
 %macro inner;
     %put THIS IS INNER;
     %inrmost;
 %mend inner;
 %macro inrmost;
     %put THIS IS INRMOST;
 %mend;
     options nomlogicnest;
     %outer
Here is the output in the SAS log when you use only the NOMLOGICNEST option:
MLOGIC(OUTER):  Beginning execution.
MLOGIC(OUTER):  %PUT THIS IS OUTER
THIS IS OUTER
MLOGIC(INNER):  Beginning execution.
MLOGIC(INNER):  %PUT THIS IS INNER
THIS IS INNER
MLOGIC(INRMOST):  Beginning execution.
MLOGIC(INRMOST):  %PUT THIS IS INRMOST
THIS IS INRMOST
MLOGIC(INRMOST):  Ending execution.
MLOGIC(INNER):  Ending execution.
MLOGIC(OUTER):  Ending execution.