What is the difference between a macro variable and a global macro variable in SAS?

1 Answers
Answered by suresh

Difference between a Macro Variable and a Global Macro Variable in SAS

Difference between a Macro Variable and a Global Macro Variable in SAS

In SAS, a macro variable is a variable created and stored in the macro symbol table. It is only accessible within the scope of the macro where it is defined.

On the other hand, a global macro variable is a variable that is defined using %GLOBAL statement and is accessible throughout the entire SAS session. Global macro variables can be accessed and modified from any point in the SAS program.

Therefore, the main difference between a macro variable and a global macro variable in SAS is the scope of their accessibility. While a macro variable is limited to the specific macro where it is defined, a global macro variable can be accessed globally within the SAS environment.

Answer for Question: What is the difference between a macro variable and a global macro variable in SAS?