how to assign a macro value to a variable?

Answers were Sorted based on User's Feedback



how to assign a macro value to a variable?..

Answer / guest

by symget function;

SYNTAX:
variable=SYMGET(macro variable);

Is This Answer Correct ?    10 Yes 4 No

how to assign a macro value to a variable?..

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

how to assign a macro value to a variable?..

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

how to assign a macro value to a variable?..

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

how to assign a macro value to a variable?..

Answer / manna

data x;
%let a=01jan1960;
b=symget("a");
run;
IT IS Tested

Is This Answer Correct ?    0 Yes 0 No

how to assign a macro value to a variable?..

Answer / saritha

%let variable=value;
like
%let city='hyd';

Is This Answer Correct ?    2 Yes 7 No

how to assign a macro value to a variable?..

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

how to assign a macro value to a variable?..

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

Post New Answer

More SAS Interview Questions

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.

1 Answers  


how to rearrange the data as our wish by using dataset block?

4 Answers   Cognizant,


i have a data set with 20 observations i want label from 8 to 15 observations ? how you create this one.

6 Answers   CTS,


Explain the difference between informat and format with an example.

0 Answers  


how do the in= variables improve the capability of a merge? : Sas programming

0 Answers  






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?

7 Answers  


what is PhaseIII, ODS, TLG, Macro and Proc in SAS

0 Answers  


how to get second highest salary from a employee table and how get a 5th highest salary from a employee table?

11 Answers   ABC, Amex,


What is the difference between an informat and a format? Name three informats or formats.

13 Answers   Accenture, IBM,


Can you continue to write code while the rest of the people on the floor where you work have a noisy party to which you were not invited?

2 Answers   Oracle,


Difference b/n proc means and proc summary procedures?

3 Answers   Accenture,


Explain the special input delimiters used in sas programming.

0 Answers  


Categories