System options for debugging macros

by Irina 10. August 2007 09:23

These five system options affect the kinds of messages SAS writes in your log. The default settings appear in bold.
MERROR | NOMERROR when this option is on, SAS will issue a warning if you invoke a macro that SAS cannot find.
SERROR | NOSERROR    when this option is on, SAS will issue a warning if you use a macro variable that SAS cannot find.
MLOGIC | NOMLOGIC    when this option is on, SAS prints in your log details about the execution of macros.
MPRINT | NOMPRINT     when this option is on, SAS prints in your log the standard SAS code generated by macros.
SYMBOLGEN | NOSYMBOLGEN when this option is on, SAS prints in your log the values of macro variables.
While you want the MERROR and SERROR options to be on at all times, you will probably want to turn on MLOGIC, MPRINT, and SYMBOLGEN one at a time and only while you are debugging since they tend to make your log hard to read. To turn them on (or off), use the
OPTIONS statement, for example:
OPTIONS MPRINT NOSYMBOLGEN NOMLOGIC;

About the author

Irina Spivak Irina Spivak
Team Leader at G-Stat. More...


Send mail Email

Blogroll

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2012

    Sign in

    eXTReMe Tracker