%macro pf(din=, tbl=, whrstr=, dout=); proc freq data=&din. noprint; tables &tbl / out=&dout; &whrstr; run; %mend pf; %pf(din=sdtm.ex, tbl=extrt*exdose, whrstr=, dout=tempex);