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 the difference Using & and && in the macro variables

5 Answers   Accenture,


When looking for data contained in a character string of 150 bytes, which function is the best to locate that data: scan, index, or indexc?

2 Answers   Accenture,


How can you put a "trace" in your program?

2 Answers   Quintiles,


what is portability of sas programmes?

2 Answers   Capital One,


please can you tell me that in companies sas work are doing by through sas coding or sas wizard ??

0 Answers  






I have a dataset concat having variable a b & c. How to rename a b to e & f?

0 Answers  


Explain the difference between informat and format with an example.

0 Answers  


How would you code a merge that will write the matches of both to one data set, the non-matches from the left-most data?

0 Answers  


data task; input id date date9. visit; cards; 101 01jan2015 1 101 02jan2015 2 101 06jan2015 3 102 04jan2015 1 102 07jan2015 2 102 12jan2015 3 103 06jan2015 1 103 13jan2015 2 ; run; write a program to find out missing dates between visits by each subject.

1 Answers  


how are numeric and character missing values represented internally? : Sas programming

0 Answers  


calculate the sum of value using only DATA STEP. data count_; input year name $ value; cards; 2006 xxx 10 2007 yyy 12 2006 xxx 20 2008 yyy 15 2007 xxx 15 ; out put should be like this year name T_value ----------------------- 2006 xxx 30 2007 xxx 15 2007 yyy 12 2008 xxx 15

6 Answers  


What is a pdv and what are its functions?

0 Answers  


Categories