Skip to Main Content
SAS Certified Professional Prep Guide
book

SAS Certified Professional Prep Guide

by SAS Institute
October 2019
Intermediate to advanced content levelIntermediate to advanced
430 pages
19h 4m
English
SAS Institute
Content preview from SAS Certified Professional Prep Guide

Controlling Variable Scope

Scope of Macro Variables

Every macro variable has a scope.
Macro variable scope can either be global or local. Global macro variables can be created at any time during a SAS session, can persist for the duration of the SAS session, and can be referenced anywhere in the SAS session except for the DATALINES statement. To remove a global macro variable from memory within a SAS session, you must explicitly delete it using a %SYMDEL statement.
Local macro variables are created only during execution of a macro program, persist only as long as the macro is executing, and therefore can be referenced only while the macro is executing. When a macro terminates execution, its local symbol table is automatically deleted.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

SAS Certified Specialist Prep Guide

SAS Certified Specialist Prep Guide

SAS Institute
SAS in Practice

SAS in Practice

Ekta Saraogi

Publisher Resources

ISBN: 9781642954692