User log record recovery program exits XRCINIT and XRCINPT

At warm and emergency restart, updates made to recoverable CICS® resources that were not committed when the system terminated must be backed out. XRCINIT and XRCINPT are invoked from the user log record recovery program, which is used to back out, where necessary, user-written system log entries. XRCINIT is invoked at warm and emergency restart:

XRCINPT is invoked whenever a user log record is read from the system log.

You can use XRCINPT to change the default actions taken by CICS at emergency restart for particular user-journaled records. Records passed to XRCINPT are those in UOWs that:

Records written by the activity keypoint exit XAKUSER are passed only if they appear in the last complete activity keypoint. They are passed after all other records. The order of presentation of records may therefore be different from their order in the reverse log stream sequence.

The format of records passed to the exit is:

Offset
Field contents
0
JTYPEID
2
Reserved
4
Length of prefix data (L). (Zero if no prefix)
8
Prefix data (if any)
8 + L
Log data

The record is mapped by the DSECT CL_USER_HEADER in copybook DFHLGGFD.

When using XRCINIT and XRCINPT, you should bear in mind that the exits may be invoked before recovery of temporary storage and transient data resources is complete.

For further guidance information about exits for unit of work backout, refer to the CICS Recovery and Restart Guide.

Coding the exit programs

CICS services can be used in exit programs invoked from these exits using the XPI or EXEC CICS commands. However, you need to consider the following:

Enabling the exit programs

To enable these exits, you must do one of the following:

If you use the TBEXITS parameter to enable the exits, a global work area of 4 bytes is provided. If you use a PLTPI program, you can select the size of the global work area. You can also enable more than one exit program for use at each exit point; the TBEXITS parameter allows only one exit program at each exit point. PLTPI processing is described in Writing initialization and shutdown programs.

Exit XRCINIT

When invoked
At warm and emergency restart:
Exit-specific parameters
UEPTREQ
Address of a 1-byte flag indicating the reason for the call. When UEPTREQ has a value of UEUSINIT, the exit has been invoked at the start of user recovery, and when UEPTREQ has a value of UEUSTERM, the exit has been invoked at the end of user recovery.
UEPRSTRT
Address of a 1-byte flag that indicates how CICS was restarted:
UEPRWARM
Warm start
UEPREMER
Emergency start.
Return codes
UERCNORM
Continue processing. No other return codes are supported.
XPI calls
All can be used. See topic User log record recovery program exits XRCINIT and XRCINPT for restrictions.

Exit XRCINPT

When invoked
At warm and emergency restart, once for each user log record found in the system log.
Exit-specific parameters
UEPUOWST
Address of a 1-byte flag indicating the disposition of the UOW. The possible values are:
UEPUOWAK
Activity keypoint record
UEPUOWCM
UOW committed
UEPUOWBO
UOW backed out
UEPUOWIF
UOW was in-flight
UEPUOWID
UOW was in-doubt.
UEPLGREC
Address of the log record just read. The journal control record can be mapped using the information supplied in CICS logging and journaling.
UEPLGLEN
Address of a fullword containing the length of the log record.
UEPTAID
Address of a 4-byte field containing the task identifier.
UEPTRID
Address of a 4-byte field containing the transaction identifier.
UEPTEID
Address of a 4-byte field containing the terminal identifier.
Note:
The values of the fields addressed by UEPTAID, UEPTRID, and UEPTEID are meaningless for activity keypoint records (that is, if the field addressed by UEPUOWST contains UEPUOWAK).
Return codes
UERCNORM
Continue processing.
UERCBYP
Bypass this record.
XPI calls
All can be used. See topic User log record recovery program exits XRCINIT and XRCINPT for restrictions.

Related concepts
Overview -- what is a global user exit?
Overview of the XPI
Global user exit XPI examples, showing the use of storage
Related tasks
Writing global user exit programs
Making an XPI call
Related reference
List of global user exit points
The XPI functions
[[ Contents Previous Page | Next Page Index ]]