Improving Program Efficiency with Macro Variables |
Lesson
Overview |
Introduction
SAS macro variables enable you to substitute text in your SAS programs. Macro variables can supply a variety of information, from operating system information to SAS session information to any text string you define. By substituting text into programs, SAS macro variables make your programs easy to update, as this program shows: %let year=1999; title "Temporary Employees for &year"; data hrd.newtemp; set hrd.temp; if year(enddate)=&year; run; proc print data=hrd.newtemp; run; This lesson teaches you how to use the automatic macro variables supplied by the SAS System and to create and reference your own macro variables. This lesson contains 48 pages and takes approximately 60-90 minutes to complete.
After completing this lesson, you will be able to
Before taking this lesson, you should have completed the following lessons: Introduction to SAS Programming |
Copyright © 2002 SAS Institute Inc.,
Cary, NC, USA. All rights reserved.