10# harlon1976
Based on what I understand your pseudo-macro codes I modify as below.
%let n=200;
data a;
do i=1 to &n;
x=uniform(0);
fi=arcos(-1);
y=sin(2*fi*x);
output;
keep y x fi i;
end;
run;
%macro fast(a, j);
proc fastclus data=a out=Clust&j maxclusters=&j noprint;
var x;
run;
proc sort out=flei&j;by cluster;
run;
proc means noprint data=flei&j;
var x; by cluster;
output out=menx&j(keep=rx) range=rx;
run;
proc means data=menx&j noprint;
var rx;
output out=big&j max=zuizhi;
run;
%mend;
%macro ml(m,zb);
%let trigger=0;
%do j=2 %to &m;
%if &trigger=0 %then %fast(a,&j);
data _null_;
set big&j;
if zuizhi le &zb then call symputx('trigger',1);
stop;
run;
%put >>>>>>>loop number j=&j;
%if &trigger=1 %then %return;
%if &j=&m %then %return;
%end;
%%mend ml;
%ml(20,0.1);