Amadeus cookies policy - you'll see this message only once.

Amadeus use cookies on this website. They help us to know a little bit about you and how you use our website, which improves the browsing experience and marketing - both for you and for others. They are stored locally on your computer or mobile device. To accept cookies, continue browsing as normal. Or, go to the privacy policy for more information.

SAS Macro

Course Length - 2 Days

This course covers the SAS Macro Language in depth. The theory and methods of the Macro facility are discussed through examples and applications. You will be able to write your own Macros, understand the structure of the SAS Macro Language and deal with the various functions available in the SAS Macro Language.


SAS Macro Public Course Dates

Due to Covid-19 all Amadeus training will be delivered via live web classes. Our live Web classes are as interactive as our classroom training, there are also some benefits - no travelling time and costs!


SAS users seeking to extend their Programming Skills.


Ideally the delegate will have attended the SAS Fundamentals course or have an equivalent level of competence. We recommend that attendees have three to six months of regular SAS programming experience to gain the most benefit from this course.


M1 lntroduction

  • Common Coding Tasks
  • General Strategy

M2 Macro Variables

  • Introduction
  • Automatic Macro Variables
  • Determining the Values of Macro Variables
  • User-Defined Macro Variables
  • Resolution Considerations
  • Macro Variables vs. DATA Step Variables

M3 Macros

  • Definition of a Macro
  • Passing Parameters
  • Compilation and Execution Phases

M4 Behind the Scenes

  • Symbol Table Rules
  • Deleting Macro Variables
  • Nested Macros
  • GLOBAL and LOCAL Variables

M5 Macro Programming

  • Directing Macro Execution
  • Conditional Termination of Macro Flow
  • String Manipulation

M6 The DATA Step Interface

  • Functions and Call Routines
  • Call SYMPUT 

M7 Handling Special Characters

  • Introduction
  • Numeric Evaluations
  • Introduction to Quoting Functions

M8 Working with Macros

  • Using the %INCLUDE Statement
  • The Autocall Library
  • How SAS Resolves Macro Calls
  • Writing Successful Macros