data a;
format t time5.;
input t time5. gj;
cards;
9:27 43
9:27 43
9:27 42.99
9:28 43
9:29 42.7
9:29 42.32
9:29 42.5
9:30 42.33
9:30 42.3
9:31 42.5
;
run;
proc sort;
by t;
run;
data b;
retain flag 0;
set a;
by t;
if first.t & last.t then flag=1;
else if first.t then flag=1;
else if first.t=0 then flag+1;
run;