/* always output supporting file */
ods pdf file="&workdir\&progname..pdf";
footnote2 "Program Name: &progname..sas on %sysfunc(today(),mmddyy10.)
%sysfunc(time(),time.)";
*************************************************************;
** rename items to q1-q.. and set nitems and ds(name);
*************************************************************;
DATA pfdata;
SET mydata.pfdata;
rename
BATHING1 = q1
DRESSING1 = q2
EATING1 = q3
CHAIRS1 = q4
WALKING1 = q5
TOILET1 = q6;
%let nitems=6; * number of items;
%let ds=pfdata; * datasetname;
RUN;
*************************************************************;
** no changes beyond this point;
%include "&workdir\ordalpha.mac" /nosource;
*options macrogen mprint mlogic symbolgen;
%ordalph(ds=&ds,items=q1-q&nitems);