What is difference between Global n Local Macro Variables..?

Answers were Sorted based on User's Feedback



What is difference between Global n Local Macro Variables..?..

Answer / suman

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

What is difference between Global n Local Macro Variables..?..

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

What is difference between Global n Local Macro Variables..?..

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

What is difference between Global n Local Macro Variables..?..

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

What is difference between Global n Local Macro Variables..?..

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 difference between Global n Local Macro Variables..?..

Answer / prakah

what is above said is exactly right

Is This Answer Correct ?    4 Yes 6 No

Post New Answer

More SAS Interview Questions

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?

3 Answers  


What is the function of output statement in a SAS Program?

0 Answers  


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 ?

1 Answers   Satyam,


what is the difference between proc means and proc summary?

2 Answers   Accenture,


How would you keep from overlaying the a SAS set with its sorted version?

4 Answers  






What can you learn from the SAS log when debugging?

0 Answers   Quintiles,


what has been your most common programming mistake? : Sas programming

0 Answers  


Why and when do you use proc sql?

0 Answers  


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?

10 Answers   Accenture,


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?

5 Answers  


How many missing values are available? When might you use them?

1 Answers   Quintiles,


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)?

0 Answers  


Categories