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 |
If you need the value of a variable rather than the variable itself what would you use to load the value to a macro variable?
What is the function of output statement in a SAS Program?
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 the difference between proc means and proc summary?
How would you keep from overlaying the a SAS set with its sorted version?
What can you learn from the SAS log when debugging?
what has been your most common programming mistake? : Sas programming
Why and when do you use proc sql?
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
There are 200 observations in a dataset, i want to pull out the observation no's 100, 150,180,190 by using Proc SQL? How you can get it?
How many missing values are available? When might you use them?
Hi,by usining ptf how we have to combine (likr merge)10 datasets at a time in the oracle database(and write a macro code also)?Like this i have a douts a lot if you dont mind may please send one text mail for me(madhusudhanap16@gmail.com)?