Advanced SAS® Macros




This course is designed for experienced SAS macro programmers who would like to use the advanced features of the SAS macro language.


1 day

Prerequisites Knowledge of the fundamentals of SAS system and the SAS macro languages is required. An introductory course such as “Introduction to SAS Macros” or equivalent experience is needed.


This course will cover advanced facilities of the SAS macro system. The course concentrates on knowing when and how to utilize advanced features and to exploit them for successful SAS systems. This one day class is a mixture of lecture and “hands-on” exercises.


  • Understand when and when not to use the SAS macro system
  • Utilize macro quoting to process special characters
  • Perform numerical calculations
  • Interface between macro language and SAS DATA, PROC steps
  • Build a library of macros using autocall, compiled macros
  • Build utility macros for SAS/INTRNET parsing and parameter passing
  • Develop good practices for coding and naming
  • Create portable applications


  • How macros fit in the SAS system
    • when macros are appropriate
    • macro logic and calculations
    • comparison to DATA step language
  • Data interchange with macros
    • reading and writing data
    • interfacing with DATA and PROC steps
    • calling macro and data step functions
    • applications
  • Systems Development with Macros
    • conventions and best practices
    • documentation
    • nesting of macros
    • debugging techniques
    • portability
  • Macro libraries and utilities
    • autocall macros
    • utility macros
    • compiled macros
  • Local and Global Referencing Environments




Unsure? Fill out our training assessment form!

Would you like help finding your SAS training solution? Call 1-800-997-7081 or email for assistance!