data x;
input Race_number Horse_code Distance_ran ;
cards;
1 1 1
5 1 1
14 1 1
250 25 1
260 25 4
310 25 4
312 25 4
;
data xxx;
do _n_=1 by 1 until(last.horse_code);
set x;
by horse_code;
if distance_ran=lag(distance_ran)
then new_distance=1;
else new_distance=0;
if _n_=1 then new_distance=0;
output;
end;
run;


雷达卡
京公网安备 11010802022788号







