Chapter 11: Debugging

11.1 Store the Generated SAS Code

11.2 Control Diagnostic Messages

11.3 End When the Error Occurs

By nature, debugging macros is more difficult than debugging SAS programs. The major confounding factors are:

•    Errors might stem from either macro language or from the generated SAS code.

•    The line number references on macro error messages indicate which macro is causing the problem but not which line within the macro.

This chapter assumes familiarity with standard options such as MPRINT, SYMBOLGEN, and MLOGIC. In fact, Section 4.5 showed how to capture the current settings for these options, temporarily override them, and restore them to their original values at a later point. Current releases of the software have added ...

Get SAS Macro Language Magic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.