Make ‘em %LOCAL: Avoiding Macro Variable Collisions

From sasCommunity
Jump to: navigation, search

Abstract

Have you ever run a macro, perhaps someone else’s, and found that it inadvertently changed the value of a totally unrelated macro variable in some other seemingly unrelated macro symbol table? You may have experienced a macro variable collision

It is not unusual to use the Global macro symbol table to make macro variable values available throughout an application. Doing so, however increases the risk that a macro variable created in a macro within the application will, by mistake, overwrite that value. The risk even extends beyond the global symbol table whenever you have macros that call macros.

This paper discusses the concept of the macro variable collision, what causes it, and how you can protect yourself and others from its potentially crippling effects.


Online Materials

View the pdf for this paper.


Contact Info

Please check out my user page. You can also email me.