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 |
How to write duplicate records into a separate dataset using sort?
why only we use SAS? their r many programmin language like SPSS, Oracle... Why SAS?
How substr function works in sas?
what is SAS/Graph?
Code a PROC SORT on a data set containing State, District and County as the primary variables, along with several numeric variables?
explain the difference between proc means and proc summary?
What is the maximum length of the macro variable? : sas-macro
what is the difference between informat$8. $char8.
what do the pad and dim functions do? : Sas programming
How many ways to overcome a missing values???
How could you generate test data with no input data?
what are the different ways of merging two datasets.name atleast 4.