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.

Course delegates are entitled to attend a free live two hour Macro revision webinar when back in the workplace up to one year following the course.

Audience

SAS users seeking to extend their Programming Skills.



Prerequisites

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.

Topics

M1 lntroduction

  • Common Coding Tasks
  • General Strategy

M2 Macro Variables

  • Introduction
  • Automatic Macro Variables
  • Determining the Values of Macro Variables
  • Creating 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
  • %SYSFUNC and %QSYSFUNC and %SYSCALL

M6 The DATA Step Interface

  • Functions and Call Routines
  • SYMGET
  • Call SYMPUT and Call SYMPUTX

M7 Handling Special Characters

  • Introduction
  • Numeric Evaluations
  • Introduction to Quoting Functions

M8 Working with Macros

  • Using the %INCLUDE Statement
  • The Autocall Library
  • Storing Macros as Catalog Source Entries (Optional)
  • How SAS Resolves Macro Calls
  • Writing Successful Macros