data _null_;
if 0 then set a (rename=(a=_a));
if _n_=1 then do;
declare hash h(dataset:'a(rename=a=_a)',ordered:'a');
h.definekey('id');
h.definedata(all:'y');
h.definedone();
declare hiter hi('h');
call missing(id,_a ,b);
end;
do point=1 to n;
set a point=point nobs=n;
if point>=5 and mod(point,5)=0 and a>=10 then do;
do while (hi.setcur(key:id)=0);
hi.prev();
a=0;
h.replace(key:id,data:id,data:a,data: b);
leave;
end;
end;
end;
h.output(dataset:'want(rename=(_a=a)');
stop;
run;