SAS Macro Language 1: Essentials

COURSE OUTLINE:

Description

This course focuses on the components of the SAS macro facility. In this course, you will learn how to design, write, and debug macro systems. Emphasis is placed on understanding how programs with macro code are processed.

Certification:

SAS Certified Clinical Trials Programmer Using SAS 9

Audience

Experienced SAS programmers who have a sound understanding of DATA step processing and who want to write SAS programs that are reusable and dynamic

Learning Objectives

  • Perform text substitution in SAS code
  • Automate and customize the production of SAS code
  • Construct SAS code
  • Use macro variables and macro functions

1. Introduction

  • Course logistics
  • Purpose of the macro facility
  • Program flow

2. Macro Variables

  • Introduction to macro variables
  • Automatic macro variables
  • Macro variable references
  • User-defined macro variables
  • Delimiting macro variable references
  • Macro functions

3. Macro Definitions

  • Defining and calling a macro
  • Macro parameters

4. DATA Step and SQL Interfaces

  • Creating macro variables in the DATA step
  • Indirect references to macro variables
  • Creating macro variables in SQL

5. Macro Programs

  • Conditional processing
  • Parameter validation
  • Iterative processing
  • Global and local symbol tables

6. Learning More

  • SAS resources
  • Beyond this course

7. Supplemental Materials

  • Program flow