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

What is instream data in SAS?

1 Answers  


What would be the result of the following SAS function (given that 31 Dec, 2000 is Sunday)?

0 Answers  


What is factor analysis?

0 Answers  


What is the difference between a PROC step and a DATA step?

14 Answers   Accenture, HSBC,


what are the advantages of using SAS in clinical data mangement? why should not we use other software products in managing clinical data?

2 Answers   Wockhardt,


Explain the message ‘MERGE HAS ONE OR MORE DATASETS WITH REPEATS OF BY VARIABLE’.

2 Answers  


hi tell be about pfizer? how to compare the work with other companies ? please tell me how to login and work also?

1 Answers   Pfizer,


what are the considerations when picking a SAS/STAT procedure?

0 Answers   Accenture, Quintiles,


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

0 Answers  


What’s the difference between var b1 – b3 and var b1 — b3?

0 Answers  


One way of creating a new variable in Macros is by % Let....What is the other way..?

5 Answers   TCS,


what is intially documentation in sas?

1 Answers   Accenture,


Categories