COBOL Manual for TNS and TNS/R Programs
Procedure Division Verbs
HP COBOL Manual for TNS and TNS/R Programs—522555-006
9-242
START
imperative-stmt-1
is an imperative statement to be executed when an invalid-key condition is
encountered by the START operation. It is required if no USE statement is
applicable for the file. If both a USE statement and an INVALID KEY phrase are
present, only the INVALID KEY phrase is used.
imperative-stmt-2
is an imperative statement to be executed when no invalid-key condition is
detected in the START operation.
END-START
ends the scope of the START statement, making the START statement a delimited-
scope statement. If the START statement does not end with an END-START
phrase, the presence of the INVALID KEY or the NOT INVALID KEY phrase makes
the START statement a conditional statement, which ends at the next period
separator.
Usage Considerations:
•
Action of the START Statement
The START statement proceeds in this manner:
1. It establishes the specified key as the key of reference and searches the file for
the first logical record whose value for that key satisfies the specified relation
with respect to the comparison data item values.
When the specified key is the prime record key or an alternate record key, the
comparison data item is handled as if it were an alphanumeric data item
(regardless of its actual description) and the normal nonnumeric comparison
rules apply, except that the standard collating sequence for the first 128
characters is always used.
When the size of the comparison data item in character positions is less than
that of the file key, the comparison proceeds as if the record’s key value were
truncated on the right so as to reduce its size to the equivalent number of
characters.
Note. The program collating sequence does not apply to file key comparisons.