September 2019
Beginner to intermediate
346 pages
7h 35m
English
Another use of an indirect reference macro is that we can generate a series of references with a single macro call by using an iterative %DO loop:
%Let ClassID1 = A12341;%Let ClassID2 = A23232;%Let ClassID3 = B34233;%Let ClassID4 = B53244;%Let ClassID5 = C23425;%Let ClassID6 = D32426;%Macro ClassIDYear; %Do i=1 %To 5; &ClassID&i %End;%Mend;%Put %ClassIDYear;
The output that's generated from the preceding code is a list of macro variables:
SYMBOLGEN: Macro variable CLASSID resolves to A1234SYMBOLGEN: Macro variable I resolves to 1SYMBOLGEN: Macro variable CLASSID resolves to A1234SYMBOLGEN: Macro variable I resolves to 2SYMBOLGEN: Macro variable CLASSID resolves to A1234 ...
Read now
Unlock full access