Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Actions at the OPENC exit

&pagelevel(3)&pagelevel

If a file cannot be opened because it was not closed correctly during previous processing (e.g. due to a system crash), PERCON branches to the EXLST exit OPENC. This exit provides the VERIF macro which can be used to unlock the file and restore consistency.

The contents of an ISAM file may be modified as a result of a restore. With the other access methods, the file is merely unlocked, possibly with updating of HIGHEST-USED-PAGE (LAST-PAGE-POINTER). For this reason, PERCON actions at the OPENC exit differ depending on the access method used.

The following actions at the OPENC exit are programmed:

  • Non-ISAM files:
    Since file contents are not modified in this case, restore using the VERIF macro is always attempted. The user is informed of the attempt via message PER0092. If an error occurs during the attempted restore, message PER0016 is additionally output.

  • ISAM files in interactive mode:
    Message PER0093 prompts the user to specify whether a restore is to be attempted or not. A positive response (YES) results in a restore attempt using the VERIF macro, a negative response (NO) results in quitting the OPENC exit. If an error occurs during VERIF processing, message PER0016 is additionally output.

  • ISAM files, non-interactive mode:
    Message PER0094 informs the user that a restore is necessary. Since the user cannot be prompted to confirm, no restore takes place and PERCON quits the OPENC exit.

If a file is restored without error message, PERCON quits the OPENC exit and attempts to open the file again.

If no restore is performed or an error occurs during restore, input files are handled in accordance with the value of the OPEN-ERROR operand of the ASSIGN-INPUT-FILE statement. If the error concerns an output file, the conversion step is aborted.