COBOL Manual for TNS/E Programs (H06.03+)

Procedure Division Verbs
HP COBOL Manual for TNS/E Programs520347-003
9-232
START
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).
TIME LIMIT Phrase
If the TIME LIMIT phrase appears, the time limit operand is evaluated and
rounded, if necessary, to include at most two fractional digits. When the result is
negative, the TIME LIMIT phrase does not apply, and the operation is not subject
to a time limit; otherwise, the result specifies the time interval, in seconds, within
which the start operation must complete. The start operation fails if an acceptable
record cannot be located within the time interval specified.
If the TIME LIMIT phrase is specified with a nonnegative value, and the file is not
opened with time limits enabled, the program terminates with an I-O status code
“90,” and a message, “File is not opened for timed I-O,” is delivered to the
process’s home terminal.
“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.
I-O Status Code Unsuccessful Start Operation (page 2 of 2)