What is the difference Using & and && in the macro variables
Answers were Sorted based on User's Feedback
Answer / naga
& is used to resolve the direct macro reference.
&& is used to resolve the indirect macro reference.
for example let us assume we need to resolve city1 to banglore
%let &city&n /*incorrect*/
%let &&city&n /*correct*/
| Is This Answer Correct ? | 20 Yes | 1 No |
Answer / smriti
& represents that it is a macro variable and && is used to
replace the macro variable with the value of the variable.
| Is This Answer Correct ? | 7 Yes | 8 No |
Answer / alla
when concatinating two macro variable
%let a=sai;
%let b=kumar;
%let &a &b;it resolves as sai kumar
if u want to remove the space b/t then use
%let &&a&b; it resolves as saikumar
when you use %let &a&b;resolves as &akumar
| Is This Answer Correct ? | 2 Yes | 6 No |
Answer / srk
there is nothing difference b/w & and && for resolving
macros both are same..these are two types of syntax for
resolving macro variable.
| Is This Answer Correct ? | 1 Yes | 12 No |
If a variable contains letters or special characters, can it be numeric data type?
If you have a data set that contains 100 variables, but you need only five of those, what is the code to force SAS to use only those variable?
what is the formula to measure Baseline
If i doest required Cumilative frequency in my table, generated by using PROC FREQ what i had to do?
Where do you use proc means over proc freq?
how can get the first and last observations in a dataset using Proc SQl?
Explain why double trailing @@ is used in input statement?
What are the default statistics that proc means produce?
What is the pound sign used for the DATA _NULL_?
What is the purpose of trailing @ and @@? How do you use them?
How we can create SAS USER DEFINED CODE?
Do you need to combine data sets? How should you combine data sets– MERGE or SET statements in DATA steps,PROC APPEND,PROC SQL?