Use the DEFEXIT command to request CICS® VR
archive or the log stream copy utility to call one or both of the
exits.
Format

.----------------------------------------------.
V |
>>-DEFEXIT----+-PRECOPY--(--precopy exit name--)---------+-+---->
'-TERMINATION--(--termination exit name--)-'
>--+-----+-----------------------------------------------------><
'-OLD-'
Keywords
- PRECOPY(precopy exit name)
- Specifies that the precopy exit must be used. This exit gains
control before every log record is written to the output data sets. You can suppress copying log records to the DWWCOPYn
output data set if you specify the COPIES(0) keyword in the previous
LOGSTREAMCOPY command. You can then use your copy of this record
for any purpose. You cannot change the original log record. The PRECOPY
keyword is optional; only one PRECOPY keyword is allowed for each
DEFEXIT control statement.
- precopy exit name
- Defines the name of the load module for the precopy 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. This exit is
called when CICS VR archive or the log stream copy utility
is about to terminate normally. The TERMINATION keyword is optional;
only one TERMINATION keyword is allowed for each DEFEXIT control statement.
- termination exit name
- Defines the name of the load module for the termination exit.
This name is 1–8 characters.
- OLD
- Specifies that the log stream copy utility provides
compatibility for old exit routines implemented in earlier CICS VR
releases, that is CICS VR V3R3 and below, and CICS VR
V4R1 without PK28852 applied. When this keyword is specified, the
precopy and termination exits are handled as follows:
- For the precopy exit, the log stream copy utility starts the exit
in 24-bit addressing mode, and parameters are passed as pointers to
the CICS VR log stream copy record and to the 128-byte
work area.
- For the termination exit, CICS VR passes the parameter as
a pointer to the 128-byte work area.
Usage Notes
Consider these
points when you use the DEFEXIT command:
- This command is optional.
- Do not include a DEFEXIT command automatically in every archive
or log stream copy run. Write an exit program for a specific purpose,
usually for a specific situation that you have investigated.
- The exit programs must reside in a data set that is defined in
the JOBLIB, STEPLIB, or DWWLOAD ddname.
- You can only specify one DEFEXIT command per CICS VR
archive or log stream copy run.
Examples
DEFEXIT PRECOPY(PRECOPX) 1
DEFEXIT TERMINATION(TERMX) 2
Here is an explanation of each of these DEFEXIT commands:
- 1
- In this CICS VR run, the precopy exit is given control
before every log record is copied to the output data sets.
- 2
- In this CICS VR run, the termination exit is given control
when CICS VR is about to terminate.
Synonyms
The DEFEXIT Synonyms table provides
DEFEXIT commands or keywords along with acceptable synonyms to use
in place of the commands or keywords:
Table 1. DEFEXIT SynonymsCommand or keyword |
Synonyms |
DEFEXIT |
X, DX, EXIT, EXITS |
PRECOPY |
COPY |
TERMINATION |
TERM |