System options for debugging macros
10. August 2007 09:23These 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;

Email 