Nice article Rick! I never knew about the Proc Univariate method.

I'll pitch in with a hash object approach.

data want;

if _N_ = 1 then do;
dcl hash h(ordered : 'd', multidata : 'y');
h.definekey('x');
h.definedone();
dcl hiter i('h');
end;

set have end = z;

h.add();

if z then do _N_ = 1 by 1 while(i.next() = 0 & _N_ <= 10);
output;
end;

run;