Writing Flexible Code with the SAS Macro Facility

7.1    Macro Concepts

7.2    Substituting Text with Macro Variables

7.3    Concatenating Macro Variables with Other Text

7.4    Creating Modular Code with Macros

7.5    Adding Parameters to Macros

7.6    Writing Macros with Conditional Logic

7.7    Writing Data-Driven Programs with CALL SYMPUT

7.8    Debugging Macro Errors


7.1 Macro Concepts

Not so long ago the SAS macro facility was considered an advanced topic relevant only to experienced SAS users. Over time, however, macros have become more prevalent so that now even new SAS users would do well to know a little about the SAS macro facility. Fortunately, the basic macro concepts are not difficult to understand. This chapter introduces ...

Get The Little SAS Book: A Primer, Fifth Edition, 5th Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.