COBOL Manual for TNS and TNS/R Programs

Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs522555-006
9-244
START
The values of the I-O status data item for unsuccessful start operations are:
Invalid-Key Condition
If the START statement contains the INVALID KEY phrase, control passes to the
imperative statement in that phrase, and no USE procedure is executed. If the
START statement does not contain an INVALID KEY phrase, but an applicable
USE procedure exists, that procedure is executed.
Key Data Item
The data item specified by key is the comparison data item for the start operation.
When this data item is a file key data item, that key is the specified key for the start
operation; otherwise, the file key data item of which key is a leftmost subordinate
specifies the file key for the start operation.
The key data item can be reference-modified. It can be a level 66 (RENAMES)
item.
key can also be an item whose description contains a REDEFINES clause or
subordinate to an item whose description contains a REDEFINES clause. The
redefining data item and, in the latter case, the data item subordinate to the
redefining item must contain the leftmost character positions of the redefined data
item.
When the KEY phrase does not appear, the start operation behaves as if the
START statement includes the phrase KEY EQUAL TO the-key, in which the-
key is either the relative key data item (for files with relative organization) or the
prime record key data item (for files with indexed organization).
I-O Status Code Unsuccessful Start Operation
“23” The file position indicator indicates that an optional input file is not
present, the invalid-key condition exists, and the start operation
terminates.
“30” Either the time specified in the TIME LIMIT phrase elapsed before
the start operation completed (indicated by the special register
GUARDIAN-ERR having the value “40”), or the start operation
failed for some non-COBOL reason. In either case, the value of
the file position indicator becomes undefined.
“47” The file identified by file-name is not open for INPUT or for
I-O. The start operation terminates.
“90” The program attempted to use the TIME LIMIT phrase when the
associated OPEN statement does not specify TIME LIMITS.
“91” The program attempted to use the POSITION phrase when the
file has insertion-ordered alternate keys. The start operation fails.