3300-LOAD-SUMMARY-TABLE.
SET SUMMARY-IDX TO 1.
SEARCH TABLE-SUMMARY-INFO VARYING SUMMARY-IDX
WHEN TBL-LOCATION-CODE(SUMMARY-IDX) =
SORT-LOC
PERFORM 3400-LOAD-CAR-SUM-TABLE THRU 3400-EXIT
WHEN TBL-LOCATION-CODE(SUMMARY-IDX) =
SPACES
MOVE SORT-LOC TO
TBL-LOCATION-CODE(SUMMARY-IDX)
MOVE SORT-LOCATION-NAME TO
TBL-LOCATION-NAME(SUMMARY-IDX)
MOVE SORT-LOCATION-CITY-ST TO
TBL-LOCATION-CITY-ST(SUMMARY-IDX)
PERFORM 3400-LOAD-CAR-SUM-TABLE THRU 3400-EXIT
END-PERFORM.
3300-EXIT.
EXIT.
3400-LOAD-CAR-SUM-TABLE.
SET CAR-SUM-IDX TO 1.
SEARCH TBL-SUMMARY-INFO VARYING CAR-SUM-IDX
WHEN SUM-CARRIER(SUMMARY-IDX, CAR-SUM-IDX) =
SORT-CARRIER
ADD SORT-EDE-INCENTIVE TO
SUM-INCENTIVES(SUMMARY-IDX, CAR-SUM-IDX)
WHEN SUM-CARRIER(SUMMARY-IDX, CAR-SUM-IDX) = SPACES
MOVE SORT-CARRIER TO
SUM-CARRIER(SUMMARY-IDX, CAR-SUM-IDX)
ADD SORT-EDE-INCENTIVE TO
SUM-INCENTIVES(SUMMARY-IDX, CAR-SUM-IDX)
END-PERFORM.
3400-EXIT.
EXIT.
When it gets to the second paragraph, while searching it advanced both indexes....how do I get it to only advance the secondary index? I thought specifying only the secondary index in the VARYING clause would do it, but it didn't work.
SET SUMMARY-IDX TO 1.
SEARCH TABLE-SUMMARY-INFO VARYING SUMMARY-IDX
WHEN TBL-LOCATION-CODE(SUMMARY-IDX) =
SORT-LOC
PERFORM 3400-LOAD-CAR-SUM-TABLE THRU 3400-EXIT
WHEN TBL-LOCATION-CODE(SUMMARY-IDX) =
SPACES
MOVE SORT-LOC TO
TBL-LOCATION-CODE(SUMMARY-IDX)
MOVE SORT-LOCATION-NAME TO
TBL-LOCATION-NAME(SUMMARY-IDX)
MOVE SORT-LOCATION-CITY-ST TO
TBL-LOCATION-CITY-ST(SUMMARY-IDX)
PERFORM 3400-LOAD-CAR-SUM-TABLE THRU 3400-EXIT
END-PERFORM.
3300-EXIT.
EXIT.
3400-LOAD-CAR-SUM-TABLE.
SET CAR-SUM-IDX TO 1.
SEARCH TBL-SUMMARY-INFO VARYING CAR-SUM-IDX
WHEN SUM-CARRIER(SUMMARY-IDX, CAR-SUM-IDX) =
SORT-CARRIER
ADD SORT-EDE-INCENTIVE TO
SUM-INCENTIVES(SUMMARY-IDX, CAR-SUM-IDX)
WHEN SUM-CARRIER(SUMMARY-IDX, CAR-SUM-IDX) = SPACES
MOVE SORT-CARRIER TO
SUM-CARRIER(SUMMARY-IDX, CAR-SUM-IDX)
ADD SORT-EDE-INCENTIVE TO
SUM-INCENTIVES(SUMMARY-IDX, CAR-SUM-IDX)
END-PERFORM.
3400-EXIT.
EXIT.
When it gets to the second paragraph, while searching it advanced both indexes....how do I get it to only advance the secondary index? I thought specifying only the secondary index in the VARYING clause would do it, but it didn't work.