i want to run the macro %anova_wocf_mi in several visits. But the program only execute one time (where avisitn=6). Is any issue with my program? data avisit;
length paramcd chg $8;
mi=1;
paramcd = "NPS0203";
do i =6, 7, 8, 9, 10;
avisitn = i;
chg=compress(catx('','chg',i));
output;
end;
paramcd = "LMS0108";
do i =8, 10;
avisitn = i;
chg=compress(catx('','chg',i));
output;
end;
paramcd = "UPSIT101";
do i =3, 6, 7, 8, 10;
avisitn = i;
chg=compress(catx('','chg',i));
output;
end;
paramcd = "FEV1";
do i = 6, 7, 8, 10;
avisitn = i;
chg=compress(catx('','chg',i));
output;
end;
run;
%let paramcd=NPS0203;
proc sql noprint;
select avisitn into: vis separated by "-"
from avisit
where paramcd="¶mcd."
;
quit;
%put &vis;
%include mac_a(anova_wocf_mi.sas);
%macro loop;
%do i=1 %to %sysfunc(countw(&vis,%str(-)));
%let ppp=%scan(&vis,&i, -);
%put &ppp;
%anova_wocf_mi(paramcd=NPS0203, avisitn=&ppp., censornum=2, popoth=);
%end;
%mend loop;
%loop;
... View more