COBOL/400 Language Help


INVALID KEY Condition

The invalid key condition can occur during execution of a DELETE, READ, REWRITE, START, or WRITE statement. When an invalid key condition occurs, the input-output statement that caused the condition is unsuccessful.

When the invalid key condition exists after an input-output operation, actions are taken according to the type of error handling in effect:

If the invalid key condition does not exist after execution of the input-output operation, the INVALID KEY phrase, if specified, is ignored, and the following actions are taken:

  1. 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.
  2. 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 specified.


[ Top of Page | Previous Page | Next Page | Table of Contents ]