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 the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.
Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.