mac1c02 - 1 Chapter 2: Macro Variables 2.1 Introduction to...

Info iconThis preview shows pages 1–16. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 Chapter 2: Macro Variables 2.1 Introduction to Macro Variables 2.2 Automatic Macro Variables 2.3 Macro Variable References 2.4 User-Defined Macro Variables 2.5 Delimiting Macro Variable References 2.6 Macro Functions 2 Chapter 2: Macro Variables 2.1 Introduction to Macro Variables 2.1 Introduction to Macro Variables 2.2 Automatic Macro Variables 2.3 Macro Variable References 2.4 User-Defined Macro Variables 2.5 Delimiting Macro Variable References 2.6 Macro Functions 3 Objectives Describe what macro variables store and where macro variables are stored. Identify the two types of macro variables. 3 4 Macro Variables Macro variables store text, including the following: complete or partial SAS steps complete or partial SAS statements 4 Macro variables are called symbolic variables because SAS programs can reference macro variables as symbols for SAS code. 5 Global Symbol Table Macro variables are stored in a memory area called the global symbol table. When SAS is invoked, the global symbol table is created and initialized with automatic macro variables . 5 Automatic Variables Global Symbol Table SYSDATE 09NOV07 SYSDATE9 09NOV2007 SYSDAY Friday SYSTIME 10:47 SYSUSERID joeuser . . . . 6 Global Symbol Table User-defined macro variables can be added to the global symbol table. 6 Automatic Variables Global Symbol Table . . . . SYSTIME 10:47 SYSUSERID joeuser . . . . OFFICE Sydney DATE1 25may2008 UNITS4 User-Defined Variables 7 Macro Variables Macro variables in the global symbol table are global in scope (always available) have a minimum length of 0 characters ( null value ) have a maximum length of 65,534 (64K) characters store numeric tokens as text. 7 8 9 2.01 Quiz What are the two kinds of macro variables? Where are macro variables stored? 9 10 2.01 Quiz – Correct Answers What are the two kinds of macro variables? Automatic and user-defined Where are macro variables stored? In the global symbol table 10 11 11 12 12 Chapter 2: Macro Variables 2.1 Introduction to Macro Variables 2.2 Automatic Macro Variables 2.2 Automatic Macro Variables 2.3 Macro Variable References 2.4 User-Defined Macro Variables 2.5 Delimiting Macro Variable References 2.6 Macro Functions 13 Objectives Identify selected automatic macro variables. Display automatic macro variables in the SAS log. 13 14 Automatic Macro Variables The following are true for automatic macro variables: system-defined created at SAS invocation global in scope (always available) assigned values by SAS can be assigned values by the user in some cases 14 15 System-Defined Automatic Macro Variables Some automatic macro variables have fixed values that are set at SAS invocation: 15 Name Description SYSDATE Date of SAS invocation (17JAN08)....
View Full Document

This note was uploaded on 02/20/2012 for the course STAT 506 taught by Professor Staff during the Fall '08 term at Purdue University.

Page1 / 160

mac1c02 - 1 Chapter 2: Macro Variables 2.1 Introduction to...

This preview shows document pages 1 - 16. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online