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 |
Approximately what date is represented by SAS date value of 730
what techniques and/or procs do you use for tables? : Sas programming
The below code we are using for creating more than one macro variables in proc sql using into clause. How we can use same code to create macro variables vara, varb, varc instead of var1, var2, var3.? proc sql noprint; select count(distinct(patient)) into :var1 - :var3 from dataset1 group by trtreg1c ; quit;
how do you derive descriptive statistics?
1 Answers Accenture, Quintiles,
how do u identify a macro variable
what is the difference btw proc means and proc univariate?
What are _numeric_ and _character_ and what do they do?
Difference between informat and format?
What is the difference between class statement and by statement in proc means?
What is the purpose of using the N=PS option?
if a variable contain dates like "2015/01"---"2015/12" (yymm) ,How to add day to those dates,if them month is jan then 31 if the month is feb then 28 so on ...
what has been your most common programming mistake? : Sas programming