I was able to get it to work. I replaced lines 169-202 with the following code: %do i=1 to &ngroups; proc sql noprint; select left into :risk&i separated by '|' from estimate where stratum=&i; quit; %end; %do i=0 %to &nticks; %let tickstat&i = %str(tick=) %eval(&i+1) j=c "&&tick&i" j=c; %if &i=0 %then %do; %let tickstat&i=&&tickstat&i j=c "&&header&j" " %scan(&&risk1,%eval(&i+1),"|")"; %do j=2 %to &ngroups; %let tickstat&i=&&tickstat&i j=c "&&header&j" " %scan(&&risk&j,%eval(&i+1),"|")"; %end; %end; %else %do; %let %let tickstat&i=&&tickstat&i ' ' j=c "%scan(&risk1,%eval(&i+1),"|")"; %do j=2 %to &ngroups; %let tickstat&i=&&tickstat&i j=c "%scan(&&risk&j,%eval(&i+1),"|")"; %end; %end; %end;
... View more