RESOURCES / FOCUS AREAS
 

Base SAS

Macro Language

The macro facility is a tool for extending and customizing SAS and for reducing the amount of text that you must enter to do common tasks. The macro facility enables you to assign a name to character strings or groups of SAS programming statements. You can work with the names that you created rather than with the text itself. When you use a macro name in a SAS program or from a command prompt, the macro facility generates SAS statements and commands as needed. The rest of SAS receives those statements and uses them in the same way it uses the ones that you enter in the standard manner. Macros can also be stored and shared among multiple users.

The macro facility is provided with Base SAS software. The most current release is SAS 9.4.


Highlights

The SAS 9.4 Macro Language Facility has the following enhancements:

  • A new appendix entitled "SAS Macro Examples" that contains several programs and descriptions.
  • A new appendix entitled "SAS Macro Facility Error and Warning Messages" that lists all SAS macro error and warning messages, their causes, and their solutions.
  • New automatic macro variables that enable you to reduce the amount of text that is needed to perform common tasks.
  • New and enhanced options for macro statements that enable you to create secure macros and to integrate macros with other parts of your SAS programs.

For more information, read What’s New in the SAS 9.4 Macro Facility.