You could just add the "smallest" function to your code. e.g.:
data analysis;
set analysis_set;
array set(24) Spd_:;
do while (StDev>10);
call missing (set(whichn(smallest(1, of set(*)),of set(*))));
call missing (set(whichn(largest(1, of set(*)),of set(*))));
StDev=std(of set(*));
Mean=harmean(of set(*));
end;
run;
Art, CEO, AnalystFinder.com
... View more