data test_1;
input x 8.;
cards;
4
6
;
run;
%macro p1();
proc ttest data=data2;
run;
%mend;
%macro p2();
proc ttest data=data3;
run;
%mend;
data test_2;
set test1;
if x>5 then do;%p1();end;
else if x<=5 then do;%p2();end;
run;
不知道这样可以吗?