Hi all,
I have the following macro variables:
day_1_start = 'something'
day_2_start = 'somethingelse'
I am now trying to call them in a loop, and so (within a macro loop) have
%do i = 1 %to 5;
var = var * &day_&i._start ;
%end;
but it's not working. The log says 'WARNING: Apparent symbolic reference DAY_ not resolved.'
Any advice?
Thanks,
Marco
Put an extra & in from of &day:
var = var * &&day_&i._start ;
That causes the first pass to resolve to &day_1_start, and the second pass resolves to something.
Tom (I hate macros) Kari
Put an extra & in from of &day:
var = var * &&day_&i._start ;
That causes the first pass to resolve to &day_1_start, and the second pass resolves to something.
Tom (I hate macros) Kari
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.
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.