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

How do you specify the number of iterations and specific condition within a single do loop?

0 Answers  


what do the pad and dim functions do? : Sas programming

0 Answers  


What does P-value signify about the statistical data?

0 Answers  


where are dashboard components are created and maintained? : Sas-bi

0 Answers  


I Here clinical SAS training by Ramesh Azmeera is good. Is it confirm ?

2 Answers  






what is study design in while working with SAS? what are screening variables in SAS?

0 Answers   MSCR,


Of all your work, where have you been the most successful?

0 Answers   Oracle, Six Sigma,


I need level 2 to 5 sas using companies in india

0 Answers  


What is the different between functions and PROCs that calculate the same simple descriptive statistics?

0 Answers   Quintiles,


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.

4 Answers  


how to import XTP files into SAS datasets?

1 Answers   Barclays, Institute For Plasma Research,


What is difference between sas rename and lable?

4 Answers  


Categories