Posts

Showing posts with the label Macro Debugging Options

Macro Debugging Options:MPRINT, MLOGIC, SYMBOLGEN, MACROGEN, MFILE

Macro Debugging Options: Debugging a macro code isn’t easy process. It is difficult to identify the problem in the SAS code just by seeing the ERROR message in the LOG file. It is lot easier to debug a macro if we use the following SAS options. There are four system options that are helpful in debugging SAS Macros: SYMBOLGEN, MPRINT, MLOGIC, and MFILE. Each option adds different information to the SAS LOG File. Like any other SYSTEM OPTIONS, you turn these on using the OPTIONS statement: Options macrogen symbolgen mlogic mprint mfile; You can turn them off by specifying the following OPTIONS statement: Options nomacrogen NoSymbolgen nomlogic nomprint nomfile; Both statements are needed in side SAS. Once you set any option and it will remain in effect throught the SAS session. So if you want to debug the macro use first OPTIONs Statemnt else use 2nd one. Let’s look at each option, and the output they produce in more detail… MPRINT: As we know that when we execute...