Thanks to everyone for their helpful comments. Quentin, I've adapted your code into something like what I need for the challenge I'm facing. To your point, as of right now the symget function for "numx" isn't resolving. options nomacrogen nomlogic nosymbolgen nomprint; options macrogen mlogic symbolgen mprint; %macro loops; data a; text=" ƒƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆƒƒƒƒƒƒƒƒˆ"; start=findc(text,'ˆ'); do i=1 to countc(text,'ˆ'); end =findc(text,'ˆ',start+1); call symputx(cats("MacStart",i),start); start=findc(text,'ˆ',start+1); end; j=i-1; call symputx('Num',put(j,3.)); Numx=symget("&&num"); put numx=; /* array startx Macstartx1 - Macstartx&&numx; %do a=1 %to &&numx; Startx=symget("MacStart&&a"); %end; %put &num %do a=1 %to &&numx; &MacStart&&a %end;; */ run; %put &num &numx; %do a=1 %to &# &&&&MacStart&&a %end;; %mend; %loops The part that's commented out presumes that &&numx resolves correctly. Thanks again.
... View more