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

what is sas and what are the functions? : Sas-administrator

0 Answers  


What are the difference between ceil and floor functions in sas?

0 Answers  


Suppose there is a SAS dataset with following values - Parent Child A B B C D E F G G H H I and so on….. This goes onto 1000s of observations/rows. Now how do we identify from this dataset Grandparents and Grandchildrens ?

5 Answers   American Express, Barclays,


what is the difference between informat$8. $char8.

3 Answers   SAS,


How do I CREATE an external dataset with sas code? I would like to create within a sascode a non-exsistent textfile on the host. So I am not forced to create the file befor filling it.

2 Answers  






how many types of MERGE?

17 Answers   CitiGroup,


Are you familiar with special input delimiters How are they used?

3 Answers  


Briefly explain input and put function?

0 Answers  


I need to find the numeric field which contains blank in between..Ex:123 456...there is blank in between the 123 456..I need to know if there is any SAS function to find a field.. Please suggest...

5 Answers   TCS,


In proc transpose and data step with arrays which one you pick?

0 Answers   Accenture, Quintiles,


What do you understand by the term Normal Distribution?

0 Answers  


What is the difference between informat and format statement?

1 Answers  


Categories