Example using phony data in data set HAVE
data have;
set sashelp.class(rename=(age=f1 height=f2 weight=f3));
run;
%let xcols=Age.Height.Weight;
%macro report;
proc report data=have;
columns f1-f3;
%do i=1 %to %sysfunc(countw(&xcols,.));
%let thiscol=%scan(&xcols,&i,.);
define f&i/display "&thiscol";
%end;
run;
%mend;
%report
... View more