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
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 |
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 |
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 |
How to convert HTML file into SAS dataset?
What is the use of the %include statement?
What does a PROC TRANSPOSE do?
What is the purpose of _character_ and _numeric_?
How do you connect the desktop application to metadata server? : sas-grid-administration
how can get the first and last observations in a dataset using Proc SQl?
what are some differences between proc summary and proc means? : Sas programming
Is the physical structure of the data set in the same orientation as the report? Do you need to reshape the data sets? What method should you use to reshape the data–DATA steps,PROC TRANSPOSE,output data set from a procedure?
What is the use of PROC gplot?
What are the functions which are used for character handling functions?
Please write codes to merge two datasets and keep every record in the first dataset.
how does sas handle missing values in an update? : Sas programming