Select RZSTOP Set Order To RGDSNum && RTE_NO+RTE_LET+DIRECTN+STR(SEQNO,4)+STR(NUMBER,3) Locate * Get all the RZStop records for "Base line" (Seq. #1) with no TIME values. * If there is a TIME value in any seq. 1 then we know the stop is used. * __________________ Select * From RZStop ; where RZStop.SeqNo = 1 ; and EMPTY( RZStop.Time) ; into CURSOR csrSubjRZStop ; Order by Rte_No, Rte_Let, Directn, Number lnNoRecs = _TALLY * Go thru each one and see if ANY RZStop rec, any Seq. # of this RGD has not a Time * value attached. This shows that such a stop is not actually used somewhere in * one of the route's Journeys. * __________________ Select csrSubjRZStop SCAN lcRteNo = ALLTRIM( RTE_NO) lcDirectn = DIRECTN lcStopNo = ALLTRIM( STOP) lcCounty = ALLTRIM( COUNTY) lnNumber = NUMBER * each of these selects takes too much time and, as seen on an earlier thread, a C5 happens somewhere * _______________________________ Select DISTINCT TIME from RZStop ; where ALLTRIM( RZStop.RTE_NO) == lcRteNo ; and RZStop.RTE_LET == "A" ; and RZStop.DIRECTN == lcDirectn ; and ALLTRIM( RZStop.Stop) == lcStopNo ; and ALLTRIM( RZStop.County) == lcCounty ; and RZStop.Number == lnNumber ; and not EMPTY( RZStop.TIME) ; to SCREEN NOCONSOLE && Find any time value for this particular stop across all other sequences If _TALLY = 0 && no hits on this stop # - i.e. all Time values empty && Code to report an "unused" stop EndIf EndSCAN'ppreciate it.