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 |
I have a dataset concat having variable a b & c. How to rename a b to e & f?
What SAS statements would you code to read an external raw data file to a DATA step?
how do you derive descriptive statistics?
1 Answers Accenture, Quintiles,
Does anybody has lastest SAS certification dumps,if anybody has please mail me at akshara_SAS@ymail.com Thanks Akshara
What is the difference between INPUT and INFILE ?
What do the mod and int function do? : Sas programming
How to read multiple excel sheets from a single excel file at once????
7 Answers HCL, Verinon Technology Solutions,
What function CATX syntax does?
Suppose there is a SAS dataset with following values - Parent Child A B B C D E F G G H H I and so on….. This goes onto 1000s of observations/rows. Now how do we identify from this dataset Grandparents and Grandchildrens ?
5 Answers American Express, Barclays,
proc means? proc sort? proc append? proc freq? proc print? proc content?
Why and when do you use proc sql?
What is the order of application for output data set options, input data set options and SAS statements?