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?

Answers were Sorted based on User's Feedback



If you need the value of a variable rather than the variable itself what would you use to load the..

Answer / yuyin

a=123;
call symput("x",a);
a is a variable, 123 is the value of variable a, x is macro
variable, symput will assign 123 to macro variable x.

Is This Answer Correct ?    12 Yes 0 No

If you need the value of a variable rather than the variable itself what would you use to load the..

Answer / saurabh gupta

If we need a value of a macro variable then we must define
it in such terms so that we can call them everywhere in the
program.
Define it as Global. There are different ways of assigning
a global variable.
Simplest method is

%LET

Is This Answer Correct ?    0 Yes 2 No

If you need the value of a variable rather than the variable itself what would you use to load the..

Answer / yuyin

a is macro variable. use following statment to assign the
value of a rather than the variable itself
e.g.
%let a=xyz
x="&a";
this will assign "xyz" to x, not the variable xyz to x

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SAS Interview Questions

I have 3 years of work experience at a startup and recently got certified in Data Science with SAS. I need to know how to get into the analytics industry

0 Answers  


When you will use nowd option in report???

6 Answers   Accenture,


How to specify variables to be processed by the freq procedure?

0 Answers  


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

0 Answers  


WHAT DOES A SAS SPECIFICATION DOCUMENT SDS CONTAIN ?

1 Answers  






How the date 04oct1994 is stored in SAS,not only give the answer explain in brief?

5 Answers  


Do you need to know if there are any missing values?

0 Answers  


i want to upload titles and footnotes to excel file?how it is possible?

1 Answers  


How does SAS handle missing values in: assignment statements, functions, a merge, an update, sort order, formats, PROCs?

0 Answers   Quintiles,


How can you create a macro variable with in data step? : sas-macro

0 Answers  


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

0 Answers  


what is transformation in sas data integration? : Sas-di

0 Answers  


Categories