Rational Developer for System z
Enterprise PL/I for z/OS, Version 3.8, Language Reference Manual

KEY condition

Status
KEY is always enabled.
Result
The keyed record is undefined, and the statement in which it appears is ignored.
Cause and syntax
The KEY input/output condition is raised when a record with a specified key cannot be found. The condition can be raised only during operations on keyed records. It is raised for the condition codes listed below.

When a LOCATE statement is used for the data set, the KEY condition for this LOCATE statement is not raised until the next WRITE or LOCATE statement for the file, or when the file is closed.

Read syntax diagramSkip visual syntax diagram>>-KEY--(file-reference)---------------------------------------><
 

The file-reference must be a scalar reference.

Implicit action
A message is printed and the ERROR condition is raised.
Normal return
Control passes to the statement immediately following the statement that raised KEY.

If a file is closed in an ON-unit for this condition, the results of normal return are undefined. Exit from the ON-unit with the closed file must be achieved with a GO TO statement.

Condition codes
50-58

Terms of use | Feedback

This information center is powered by Eclipse technology. (http://www.eclipse.org)