sele km go top do while not eof() t_km=km *??''+km SELECT cj31
SET ORDER TO &t_km GO top t_mc=1 t_mc1=1 t_cj=&t_km
replace &t_km.mc with 1 SKIP DO while not EOF() t_mc1=t_mc1+1 IF &t_km<t_cj t_mc=t_mc1 t_cj=&t_km ENDIF replace &t_km.mc with t_mc SKIP ENDDO sele km skip endd sele cj31 use sele km use
sele km go top do while not eof() t_km=km *??''+km SELECT cj31
SET ORDER TO &t_km GO top t_mc=1 t_mc1=1 t_cj=&t_km
replace &t_km.mc with 1 SKIP DO while not EOF() t_mc1=t_mc1+1 IF &t_km<t_cj t_mc=t_mc1 t_cj=&t_km ENDIF replace &t_km.mc with t_mc SKIP ENDDO sele km skip endd sele cj31 use sele km use