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
What can be the size of largest dataset in SAS?
how do you want missing values handled? : Sas programming
How would you code a macro statement to produce information on the sas log? This statement can be coded anywhere? : sas-macro
explain the difference between alternate key, business key, foreign key, generated key, primary key, retained key and surrogate key ? : Sas-di
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
Mention the difference between ceil and floor functions in sas?
What are the functions which are used for character handling functions?
what is sas enterprise intelligence architecture? : Sas-bi
What is the use of %include statement?
How do you specify the number of iterations and specific condition within a single do loop?
What will calendar procedure do?
What is the sas data set? : sas-grid-administration
What do the put and input function do?
how does sas handle missing values in functions? : Sas programming
Differentiate between ceil and floor functions.