"STARTING WITH ISN" Clause isn't working

Eugene is correct. To use STARTING WITH ISN you must also specify the descriptor. Your program would look like this:

READ-1. READ MULTI-FETCH OF 10 FILE DESCENDING
BY SUPER FROM #SUPER-INI TO #SUPER-FIM
*
    ADD 1                      TO #COUNT
*
    IF #COUNT = 10
      #ISN-START := *ISN
      #SUPER-FIM-2 = SUPER
      ESCAPE BOTTOM
    END-IF
END-READ
*
READ-2. READ MULTI-FETCH OF 300 FILE DESCENDING
BY SUPER FROM #SUPER-INI TO #SUPER-FIM-2
STARTING WITH ISN = #ISN-START
.....
END-READ

Also be aware that STARTING WITH ISN actually does not start with the ISN specified but with the next record. For example, if I had the following data:

RECORD SUPER    ISN
R1     ABC       10
R2     ABD       15
R3     ABD       25
R4     ABD       30
R5     ABE       12

and I did:

READ FILE BY SUPER FROM 'ABD' STARTING WITH ISN 25

The first record read would be R4. If I was reading in descending order:

READ FILE DESCENDING BY SUPER FROM 'ABD' STARTING WITH ISN 25

The first record read would be R2.

1 Like