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

If you have a dataset that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variables?

0 Answers  


if the Id has more then two transcatiion then show the first observation, IF Id has only two observation then It show both the observation

0 Answers   CTS,


how to add distinctly var variable values ex.. Data a; input var; datalines; 0 1 2 3 -1 -2 -3 ; run; adding all +ve value in one varibale n do the same for -ve too

5 Answers   CTS,


What does the trace option do?

0 Answers  


How does the internal authentication work in sas? : sas-grid-administration

0 Answers  






How we can call macros with in data step? : sas-macro

0 Answers  


Tell different ways to create Macrovarible?

3 Answers   Accenture, PharmaNet i3,


Hi Jeevan/Akshara I have tried to contact SASI Vats for latest Advanced SAS Programming Certification Dumps (A00-212) but have not got any response. I would highly and gratefully appreciate your assistance in this regard. If you guys have access to this, would you be kind enough to forward it to me ? I would abide by all the terms you have for this. Please, note my email id: upretigopi@yahoo.com Preti Sharma

0 Answers  


What do the put and input function do?

0 Answers  


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

0 Answers  


what is sas metadata repository? : Sas-bi

0 Answers  


what is treatment emergent events and treatment emregent adverse event

0 Answers  


Categories