InterviewSolution
| 1. |
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? |
|
Answer» 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. Ex: A, is macro variable. Use following statement to ASSIGN the value of a rather than the variable itself %Let A=XYZ; %put x="&A"; This will assign "xyz" to x, not the variable xyz to x. 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. Ex: A, is macro variable. Use following statement to assign the value of a rather than the variable itself %Let A=xyz; %put x="&A"; This will assign "xyz" to x, not the variable xyz to x. |
|