how to assign a macro value to a variable?
Answers were Sorted based on User's Feedback
Answer / guest
by symget function;
SYNTAX:
variable=SYMGET(macro variable);
| Is This Answer Correct ? | 10 Yes | 4 No |
Answer / ganesh k
if it is a Char then Variable="&MacroVar.";
if it is a Numaric then Variable=%eval(&MacroVar.) or %
sysevalf(&MacroVar.);
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / sr
to assign macro value means it already created then
variable=symget(macro var);
variable will get value of that macro variable
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / radhiv kumar sure
8 TO 9 TYPES WE CAN ASSIGN THE MACRO VALUE TO A VARIABLE.
CALL SYMPUT
%LET
SYMGET
| Is This Answer Correct ? | 2 Yes | 2 No |
Answer / manna
data x;
%let a=01jan1960;
b=symget("a");
run;
IT IS Tested
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / cool dude
Creating a Macro.
%Let a='City';
Assigning the macro value of a (which is 'City') to variable.
Data _null_;
b=&a;
put b= ;
run;
| Is This Answer Correct ? | 0 Yes | 6 No |
Answer / srinivas,korasavada
and also we can assign like
%let variable=value;
means the value is save in that variable
| Is This Answer Correct ? | 3 Yes | 10 No |
How would you combine 3 or more tables with different structures?
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? : sas-macro
what are 5 ways to perform a table lookup in sas? : Sas-administrator
Why Info School? BUILD YOUR CAREER WITH RIGHT GUIDANCE AND SUPPORT SAS Training in Data Management at InfoSchool Bangalore
What is the difference between %put and symbolgen? : sas-macro
Does SAS ‘Translate’ (compile) or does it ‘Interpret’? Explain.
i have a data set with 20 observations i want label from 8 to 15 observations ? how you create this one.
what are the benefits of data integration? : Sas-di
What is the difference between SAS Data step and SAS PROC SQL, and which is better?
How to read an input file in sas?
What are the differences between proc means and proc summary?
How do you put a giraffe into the refrigerator?