SAS Macro
Audience

SAS users seeking to extend their Programming Skills.

Prerequisites

Ideally the delegate will have attended the SAS Fundamentals course and have three to six months of regular SAS programming experience to gain the most benefit from this course.

Objectives

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 Macro Language.

Topics:

lntroduction

  • Common Coding Tasks
  • General Strategy
  • Workshop Session

The Data Step Interface

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

Variable Code

  • Macro Variables
  • Resolution Considerations
  • Macro Variables vs. Data Step Variables
  • Workshop Session

Special Characters

  • Evaluations
  • The Quoting Functions
  • Workshop Session

Code Bundles

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

Working with Macros

  • The Autocall Library
  • The Stored Compiled Macro Facility
  • SAS System Options
  • Writing Successful Macros
  • Workshop Session

Behind the Scenes

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

Windows and Menus (Optional)

  • Window Definition with %Window
  • %Display
  • Examples
  • Workshop Session

Code Generation

  • Directing Macro Execution
  • Conditional Termination of Macro Flow
  • String Manipulation
  • %SYSFUNC and %QSYSFUNC
  • Debugging
  • Workshop Session
  • Register Online