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?
Answer Posted / damwal
Use CALL SYMPUT routine.
Below I show how to assign the value of 3rd observation of
variable name (94) to a macro variable named "macrovar1"
data test;
input name @@;
datalines;
1 21 94 444 5
;
data _null_;
set test (firstobs=3 obs=3);
call symput("macrovar1",name);
run;
%put ¯ovar1; /*display*/
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
How to create an external dataset with sas code?
Give an example where SAS fails to convert character value to numeric value automatically?
How substr function works in sas?
what techniques and/or procs do you use for tables? : Sas programming
Mention the difference between ceil and floor functions in sas?
Are you involved in writing the inferential analysis plan? Tables specifications?
Tell e how how dealt with..
what is sas olap server? : Sas-di
Do we follow ADAM in analysis dataset development?How? Usually which version? Why is it necessary?
What is the purpose of _character_ and _numeric_?
What is factor analysis?
Describe crosslist option in tables statement?
what is proc Index? and what is proc document?
What are all the problems you faced while validating tables and reports?
Hi, Does anybody has lastest SAS certification(base, adv., clinical)dumps,if anybody has please email me at mailtorajani76@gmail.com. Thanks