As the first step in the decommissioning of the site has been converted to read-only mode.

Here are some tips for How to share your SAS knowledge with your professional network.

Macros from Beginning to Mend: A Simple and Practical Approach to the SAS® Macro Facility

From sasCommunity
Revision as of 15:54, 8 September 2016 by Paulkaefer (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
Michael G. Sadof

MGS Associates, Inc.

Bethesda, MD


The macro facility is an important feature of the SAS Language. Mastering this facility will enable the novice user to become an accomplished programmer. This tutorial session will use a building block approach taking the user from the most basic %LET statements to parameter driven, code generating macros that can save time and effort. The use of Macros will reduce the repetitiveness of manipulating data and will facilitate uniform and easy maintenance of the system. This paper will use step by step examples to show the user how to use macro substitution to provide simple yet powerful SAS code. The user will learn how to create variables on the fly, and how to use the macro facility to generate code as well as how to save sections of macro code for future use.

Online materials

View the .pdf of this paper.