%put &a &&&b &&&&&&&c;
How this works?
Each time for two & .
&a
-> result_of_&a
&& &b
->&(result_of_&b)
&& && && &c
->& & & (result_of_&c)
-> & result_of_(& (result_of_&c)
Hi Bharath,
Kindly refer to :
https://communities.sas.com/message/172742
or
http://sascertguru.blogspot.com.au/2014/09/multilevel-referencing-of-macro-in-sas.html
Regards
Uma Shanker Saini
Seriously, just don't do it. If your having to use more than one & in code, then I would suggest your programming it wrongly. Think about the problem and the data differently, will transposing/normalising the data change the code, can you use arrays, or SQL aggregates etc. Many ways to solve a problem.
Hi:
I agree with RW9 that references like &&&&a and &&&&&b are generally unnecessary, there are SOME indirect references to macro variables such as &&macvar&num that are quite useful, especially when you have numbered macro variables. I have an example of this in my paper on Macro Basics: http://support.sas.com/resources/papers/proceedings13/120-2013.pdf see Figure 18 and explanation on pages 10-11.
cynthia
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.