<<

Contents

Search

>>

 

READ-NEXT

 

 

Instruction

 

 

Syntax:

READ-NEXT <Name of Index File> ON ERROR … END

 

<Name of Index File> = <INDEX FILE>

 

Meaning:

Reads the next data record (next 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:

Name of Index File

Name of Index File

 

Sample:

CUSTOMER.NUMBER = 0

END% = 0

START CUSTOMER ON ERROR END% = 1 END

WHILE END% = 0

DO

   …

   READ-NEXT CUSTOMER ON ERROR END% = 1 END

ENDDO

 

See also:

Index File error numbers

READ

READS

READS-NEXT

READ-PREVIOUS

READS-PREVIOUS

START

STARTS

READ_NEXT_MULTI

READ_PREVIOUS_MULTI

GET_FIRST_RECORD

GET_NEXT_RECORD

SEARCH

WRITE

DELETE

OK

OK2

ERRORTEXT$

EBUS_INDEXKEY$