6.1.8.9.2 Invalid Key Condition
The invalid key condition can occur during execution of a START, READ,
WRITE, REWRITE, or DELETE statement. (For details of the causes for the
condition, see the appropriate statement in "Part 4. Environment
Division" in topic 4.0.) When an invalid key condition occurs, the
input-output statement that caused the condition is unsuccessful.
When the invalid key condition is recognized, actions are taken in the
following order:
- If the FILE STATUS clause is specified in the FILE-CONTROL entry, a
value is placed into the status key to indicate an invalid key
condition. (See Table 36 in topic 6.1.8.9.1.)
- If the INVALID KEY phrase is specified in the statement causing the
condition, control is transferred to the INVALID KEY
imperative-statement. Any EXCEPTION/ERROR declarative procedure
specified for this file is not executed. Execution then continues
according to the rules for each statement specified in the
imperative-statement.
- If the INVALID KEY phrase is not specified in the input-output
statement for a file, an EXCEPTION/ERROR procedure must be specified,
and that procedure is executed. The NOT INVALID KEY phrase, if
specified, is ignored.
X Both the INVALID KEY phrase and the EXCEPTION/ERROR procedure can be
X omitted.
If the invalid key condition does not exist after execution of the
input-output operation, the INVALID KEY phrase is ignored, if specified,
and the following actions are taken:
- If an exception condition which is not an invalid key condition
exists, control is transferred according to the rules of the USE
statement following the execution of any USE AFTER EXCEPTION
procedure.
- If no exception condition exists, control is transferred to the end of
the input-output statement or the imperative statement specified in
the NOT INVALID KEY phrase, if it is specified.
© Copyright IBM Corp. 1991, 1998
IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.
Return to library:
z/OS |
z/OS.e |
TPF |
z/VSE |
z/VM |
IBM Hardware |
IBM System z Redbooks
Glossary:
IBM terminology
Publications:
How to order publications
Readers:
Download IBM Library Reader |
Download IBM Softcopy Reader |
Download Adobe® Acrobat® Reader®
Library management:
Download IBM Softcopy Librarian
Contacts:
Contact z/OS
Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks
of Adobe Systems incorporated.