READ-PREVIOUS
|
Syntax: |
READ-PREVIOUS <Name of Index File> ON
ERROR … END <Name of Index File> = <INDEX
FILE> |
||
|
Meaning: |
Reads the previous data record (previous to
the current record) from an Index File in the sorting order of the primary
key. In the case of an error the block ON ERROR ... END is executed. This instruction is only allowed if a valid READ-, START-, READ-PREVIOUS- or READ-NEXT instruction has been executed before, otherwise the
error 1021 is reported. |
||
|
Parameter: |
|
||
|
Sample: |
CUSTOMER.NUMBER =
99999999 START CUSTOMER ON
ERROR END END% = 0 READ_PREVIOUS CUSTOMER ON
ERROR END% = 1 END WHILE END% = 0 DO … READ-PREVIOUS
CUSTOMER ON ERROR END% = 1 END ENDDO |
||
|
See also: |
|