I am trying to build a macro to handle a sequence of PROC's, but the BY variables and the VAR variables may change. Can you pass lists of variables to a macro to use in the BY and VAR statements?
i.e. something like:
%mymacro(mydataset, ('var1', 'var2'), ('var3', 'var4'));
%macro mymacro(dataset=,list1=, list2=);
proc means sum data=&dataset;
by &list1;
var &list2;
run;
%mend mymacro;
Christopher Johnson
www.codeitmagazine.com