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

Describe a time when you were really stuck on a problem and how you solved it?

0 Answers   Oracle,


I have 50 variables in one data set, In reports i want to generate every 10 variables in one page how we will write code in proc report.

4 Answers  


what do the pad and dim functions do? : Sas programming

0 Answers  


how to get second highest salary from a employee table and how get a 5th highest salary from a employee table?

11 Answers   ABC, Amex,


Differentiate between ceil and floor functions.

0 Answers  






Differentiate input and infile.

0 Answers  


What is the order of evaluation of the comparison && logical && relational operators:?

2 Answers   CitiGroup,


What are the five ways to do a table lookup in sas? : sas-grid-administration

0 Answers  


Explain the special input delimiters used in sas programming.

0 Answers  


6) Explain about below automatic variables a) _N_ b) _ERROR_ c) _CHAR_ d) _NUMERIC_ e) _ALL_ f) FIRST.BY VARIABLE g) LAST.BY VARIABLE h) _NAME_ i) _TYPE_ j) _FREQ_ k) _STAT_ l) _BREAK

1 Answers   IBM, SAS,


how to write code for left outer join in SAs using datastep?

8 Answers   CitiGroup,


Identify statements whose placement in the DATA step is critical.

6 Answers   Accenture, Labasol,


Categories