What is difference between Global n Local Macro Variables..?
Answers were Sorted based on User's Feedback
Two types of scopes exist for macro variables: global and
local. Global macro variables exist for the duration of the
SAS session and can be referenced anywhere in the program--
either inside or outside a macro. Local macro variables
exist only during the execution of the macro in which the
variables are created and have no meaning outside the
defining macro.
| Is This Answer Correct ? | 31 Yes | 0 No |
Answer / rag_uss
Global macro variables can be used anywhere in the program,
whereas Local macro variable can be used within that macro only.
| Is This Answer Correct ? | 20 Yes | 0 No |
Answer / vikram s
Global Variables are the one which can be defined at the
beginning of the program and cannot change inside the
program, whereas local variables are the one which can be
instantly with in the program
| Is This Answer Correct ? | 12 Yes | 4 No |
Answer / sandeep
Global macro variable can be created and used anywhere in
the application and global macro variable value stores in
global symbol tables
Local macro variable can be created and used only inside of
the macro block and local macro variable value stores in
local symbol tables
| Is This Answer Correct ? | 8 Yes | 0 No |
Answer / balu
global variables,is defined if it is "open code"that is everything outside the macro.and it can be used anywhere in the program.whereas local variables are defined inside the macro.and it is used only inside its own macro.
| Is This Answer Correct ? | 2 Yes | 1 No |
what is enterprise guide? What is the use of it? : Sas programming
What is connection profile? : sas-grid-administration
How to convert .xls file into CSV format?
Can you excute a macro within a macro? Describe.
What is the Program Data Vector (PDV)? What are its functions?
how to assign a macro value to a variable?
What is the maximum length of the macro variable?
what are system option ? give few examples ? what are dataset options and dataset statements ? if there is a keep option and keep statement ? which one is executed first ? Difference between a WHERE statement and IF statement ? what is the advantage of using WHERE statement option on the dataset ?
what is p-value
3 Answers Accenture, Quintiles, Sristek,
In SAS how to read the variable values having different formats. eg:mar99,mar1999 (in a single variable)
8 Answers GSK GlaxoSmithKline,
how does sas handle missing values in a merge? : Sas programming
How to merge the data using merge statement and proc format? Is the result is same ?