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 &macrovar1; /*display*/

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

explain the difference between proc means and proc summary?

880


For what purpose would you use the RETAIN statement?

1277


What is the general format of function in sas? : sas-grid-administration

779


Explain data step in SAS

856


Difference between SAS STATA & SPSS?

884


it will become easy if uuu provide website linkssss and list of consultanciessssss

1751


What can you learn from the SAS log when debugging?

1125


What is the difference between order and group variable in proc report?

1133


Mention how to limit decimal places for the variable using proc means?

855


Explain what is the use of proc gplot?

918


What is slibref?

968


What are the different operating system platforms in which we can use sas? : sas-grid-administration

817


Differentiate input and infile.

836


What are the features of SAS?

802


What is maximum storage capability of SAS?

1102