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 |
what is the primary variable in your study?
what is the use of sas management console? : Sas-di
Define run-group processing?
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
How would you code a macro statement to produce information on the SAS log? This statement can be coded anywhere.
When looking for data contained in a character string of 150 bytes, which function is the best to locate that data: scan, index, or indexc?
Mention the validation tools used in SAS?
Explain the main difference between the sas procedures and functions? : Sas-administrator
What is Tabulate.?Why we use it.? Which type of output we get from Tabulate.?
When you will use nowd option in report???
What is the maximum length of the macro variable?
when we are using the PROC TRANSPOSE? OBSERVATIONS are repeated then what will happen and what it will show in log window.