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

Diff between proc sql merge and join?

1 Answers   HSBC, Sristek,


what is the difference between proc report and proc format?

7 Answers   CTS,


How to convert HTML file into SAS dataset?

0 Answers  


What is the role of sas grid administrator? : sas-grid-administration

0 Answers  


what is OLAP?

4 Answers   CitiGroup, TCS,






Why is SAS considered self-documenting?

1 Answers   Quintiles,


What is the maximum length of the macro variable?

0 Answers  


What is the good sas programming practices for processing large data sets?

0 Answers  


How do you add a number to a macro variable? : sas-macro

0 Answers  


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

0 Answers  


Explain by-group processing?

0 Answers  


how we can create optional or required parameters in SAS macro...

5 Answers   TCS,


Categories