Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

Using the MPRINTNEST Option

The MPRINT option is an essential tool when developing macros allowing you to see the SAS code generated by a macro within the log. If however one macro makes a call to another which then generates SAS code, this cannot easily be seen and recognized in the log. This problem is illustrated in the following example:


The code above will generate the following log entries, note how although the name of the inner macro is printed, there is no indication of the fact that it is nested:

Log without MPRINTNEST:


Submitting the same macro a second time but with the MPRINTNEST option included as well as the MPRINT option provides details of the macro nesting in the log.




It is now clear to see that the second macro call is nested within the first, and if further nested call are made this will also be displayed in the same format (macro name separated by dots). For further information view the SAS help entries or the SAS support website (