START Statement

The START statement provides a means of positioning within an indexed or relative file for subsequent sequential record retrieval. This positioning is achieved by comparing the key values of records in the file with the value you place in the RECORD KEY portion of a file’s record area (for an indexed file), or in the RELATIVE KEY data item (for a relative file) prior to execution of the START statement.
Note: When the START statement is executed, the associated indexed or relative file must be open in INPUT or I-O mode.

START Statement - Format

Read syntax diagramSkip visual syntax diagramSTARTfile-name-1WITHNO LOCK1KEYISEQUALTO=GREATERTHAN>NOT LESSTHANNOT <GREATERTHANOR EQUALTO>=dataFORMAT12ISidentifier-1literal-1NULL-KEY-MAP1ISidentifier-2INVALIDKEYimperative-statement-1NOT INVALIDKEYimperative-statement-2END-START
data
Read syntax diagramSkip visual syntax diagramEXTERNALLY-DESCRIBED-KEY1data-name-1
Notes:
  • 1 IBM® Extension
  • 2 Applies only to indexed files on DATABASE devices