DEFEXIT: Define CICS® VR exit names for forward recovery

Use the DEFEXIT command to request CICS® VR to call one or more of the exits.

Format

DEFEXIT { | PREAPPLY(preapply exit name { ,NEW | ,OLD } ) | ERROR( error exit name) | TERMINATION (termination exit name) }

Keywords

PREAPPLY(preapply exit name,NEW | OLD)
Specifies that the preapply exit must be used and gives the name of the exit program that CICS® VR must call. Before every update that is made to the VSAM data set, CICS® VR passes the log record and the corresponding data set record, unless the update is an add, to the exit program. The exit program, which can change the log record, must return an action code telling CICS® VR which action to take. The PREAPPLY keyword is optional, and only one PREAPPLY keyword is allowed for each DEFEXIT command.
preapply exit name,NEW | OLD
Defines the name of the load module for the preapply exit. This name is 1–8 characters.

The NEW and OLD keywords are optional; if neither are specified, the default preapply exit type of NEW is used. If you are using CICS® Transaction Server logs, specify NEW or use the default.

ERROR(error exit name)
Specifies that the error exit must be used, and gives the name of the exit program that CICS® VR must call. When an I/O error occurs, CICS® VR passes an error code and relevant error information to the exit program. The exit program must return an action code telling CICS® VR which action to take. The ERROR keyword is optional, and only one ERROR keyword is allowed for each DEFEXIT command. If CICS® VR meets a serious error and no error exit is provided, CICS® VR issues the following message and terminates:
DWW0212S
Preceding I/O error has forced termination.
error exit name
Defines the name of the load module for the error exit. This name is 1–8 characters.
TERMINATION(termination exit name)
Specifies that the termination exit must be used, and gives the name of the exit program that CICS® VR must call. When CICS® VR is about to end normally, CICS® VR passes the completion code to the exit program. The exit program can then change the completion code and return an action code telling CICS® VR what action to take. The TERMINATION keyword is optional; only one TERMINATION keyword is allowed for each DEFEXIT command.
termination exit name
Defines the name of the load module for the termination exit. This name is 1–8 characters.

Usage Notes

Consider the following when using the DEFEXIT command:

  • This command is optional.
  • You can only specify one DEFEXIT command per CICS® VR step.
  • Do not include a DEFEXIT command automatically in every recovery run

    Write an error exit program that is appropriate for that situation.

  • If the exit program is not in the link list, it must reside in a data set that is defined to the JOBLIB, STEPLIB, or DWWLOAD ddname. You also can keep the exit program in your CICS® VR load library. If CICS VR cannot find the exit program, the following message is issued and CICS VR ends:
    DWW0206S
    The exit load module xxxx cannot be found.

Examples

  DEFEXIT PREAPPLY(PREAPP)             (1)
  DEFEXIT ERROR(ERRX) -                (2)
        TERMINATION(TERMX)

Here is an explanation of these DEFEXIT commands:

1
The PREAPPLY keyword specifies the name of the preapply exit program, PREAPP. CICS® VR passes the log record and the file to PREAPP. PREAPP can modify the record if needed, update the log, and return an action code back to CICS® VR.
2

The ERROR keyword specifies the name of the error exit program, ERRX. CICS® VR calls ERRX when an I/O error occurs and passes it information about the error. If there are logical errors on a VSAM sphere, ERRX might be able to correct them and then pass an appropriate action code back to CICS® VR.

The TERMINATION keyword specifies the name of the termination program, TERMX. CICS® VR calls TERMX just before CICS® VR terminates. If, in the same run, an I/O error occurs while CICS® VR is reading one of the logs or processing a VSAM file, TERMX might be able to recover, change the completion code accordingly, and return an action code back to CICS® VR.

Synonyms

The DEFEXIT Synonyms table provides the DEFEXIT commands or keywords and the acceptable synonyms that can be used in place of those commands or keywords:

Table 1. DEFEXIT Synonyms
Command or keyword Synonyms
DEFEXIT X, DX, EXIT, EXITS
ERROR ERR
ESDSDELETE ESDSDEL, EDEL
PREAPPLY PREAPP, PRE
TERMINATION TERM