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 create an external dataset with sas code?
what is null hypothesis? why do you consider that?
0 Answers Accenture, Quintiles,
There is a river notoriously known for it?s large crocodile population. With ease, how do you safely cross it?
libname deepak 'C:\SAS Files'; proc format; invalue convert 'A+' = 100 'A' = 96 'A-' = 92 'B+' = 88 'B' = 84 'B-' = 80 'C+' = 76 'C' = 72 'F' = 65; data deepak.grades; input ID $3. Grade convert.; *format Grade convert. ; datalines; 001 A- 002 B+ 003 F 004 C+ 005 A ; proc print data = deepak.grades; run; I get the following output Obs ID Grade 1 001 . 2 002 . 3 003 . 4 004 . 5 005 . I don’t understand why Grade shows up as a missing value. Everything seems fine, including ID $3. Now, in case I use ID : $3. Or use column input, I get the desired output. Kindly help Deepak
What is the basic syntax style in SAS?
what is the use of LRECL option.
If you set a label in the data step and call a proc freq on the data, how do you display the data without the labels and just the variables.
what is the difference between DUPKEY and NODUPKEY???
What are the difference between sas functions and procedures?
What is a macro routine?
I have 50 variables in one data set, In reports i want to generate every 10 variables in one page how we will write code in proc report.
What are the Aggregate functions in SQL ?