I am stuck writing a piece of code that features macro variables of the form &&var&i. Let me give a small example:
%macro test;
%let i=1;
%let name1=Tom;
%put &&name&i;
%mend;
%test;
This gives a warning: "Apparent symbolic reference NAME not resolved." I thought the %put statement should resolve to
1st step: &name1 (&&-->& and &i-->1)
2nd step: Tom
It seems that in the first step already, SAS searches for the macro variable &name, although there are two ampersands in front of it.
This is the SAS log, with symbolgen enabled.
WARNING: Apparent symbolic reference NAME not resolved.
SYMBOLGEN: Macro variable I resolves to 1
&&name1
Am I missing something or are there SAS settings that I should check? Thanks in advance!