backnextLearning Path
   


Introduction

Because the macro facility performs its tasks before SAS programs execute, the information that the macro facility supplies does not depend on values that are accessed or computed during the execution of a SAS program. However, sometimes it is necessary to access or create macro variables during the execution of a SAS program. There are several methods that enable the macro facility to create or access macro variables at execution time. In this lesson, you learn to use macro variables during execution of

  • a DATA step
  • a PROC SQL step
  • an SCL program.

Macro overview


Time to Complete

This lesson contains pages and takes approximately 1 hour to complete.



Objectives

In this lesson, you learn to

  • create macro variables during DATA step execution
  • describe the difference between the SYMPUT routine and the %LET statement
  • reference macro variables indirectly, using multiple ampersands for delayed resolution
  • obtain the value of a macro variable during DATA step execution
  • describe the difference between the SYMGET function and macro variable references
  • create macro variables during PROC SQL execution
  • store several values in one macro variable, using the SQL procedure
  • create, update, and obtain the values of macro variables during the execution of an SCL program.

Prerequisites

Before taking this lesson, you should complete the following lessons:

  • .

  Copyright © 2003 SAS Institute Inc., Cary, NC, USA. All rights reserved.
Terms of Use & Legal Information | Privacy Statement
backnext