System recovery program exit XSRAB

Exit XSRAB is invoked when the system recovery program (DFHSRP) finds a match in the system recovery table (SRT) for an operating system abend code.

When invoked
Exit XSRAB is invoked when the system recovery program (DFHSRP) finds a match in the SRT for an operating system abend code. For information about defining entries in the SRT, see System recovery table (SRT).

The SRT table is processed and the exit is driven, only when an MVS™ abend occurs under a CICS® essential TCB; that is, one of QR, RO, CO, SZ, RP, or FO. For nonessential TCB types, such as L8, SL, SO, or S8, the exit is not driven.

Exit-specific parameters
UEPERROR
Address of the error data structure, SRP_ERROR_DATA, which contains the following fields:
SRP_ERROR_TYPE
The 4-character error type, which is always ASRB.
SRP_SYS_ABCODE
2 bytes that contain the system abend code XXX in binary format (for example, D37).
SRP_USER_ABCODE
2 bytes that contain the user abend code NNNN in binary format (for example, 0999).
SRP_ERROR_TRANID
4-character field that contains the ID of the transaction that abended.
SRP_ERROR_STACK_NAME
8-character field that contains the name of the current kernel stack entry for the transaction at the time of the abend.
SRP_ERROR_PPT_NAME
8-character field that contains the name of the current program for the transaction. This field contains a value only if flag SRP_PPT_ENTRY is set.
SRP_ERROR_OFFSET
Fullword that contains the offset into the program that abended, as follows:
  • If flag SRP_PPT_ENTRY is set, gives the offset in SRP_ERROR_PPT_NAME
  • Otherwise, gives the offset in SRP_ERROR_STACK_NAME.
This field contains a value only if flag SRP_VALID_OFFSET is set.
SRP_ERROR_FLAGS
1 byte that contains flags:
SRP_CICS_CODE
The abend occurred while running CICS code.
SRP_USER_CODE
The abend occurred while running user application code.
SRP_PPT_ENTRY
The abend occurred while running SRP_ERROR_PPT_NAME. If this flag is not set, the abend occurred while running SRP_ERROR_STACK_NAME.
SRP_VALID_OFFSET
A meaningful offset could be determined.
SRP_VALID_REASON
MVS has supplied a reason code for the abend.
SRP_NOT_CICS_RB
CICS RB was not in control at the time of the abend (that is, the abend occurred in a system service invoked by CICS).
SRP_CICS_ERROR_REASON
4-character field that contains the MVS abend reason code. It contains a value only if flag SRP_VALID_REASON is set.
SRP_CICS_ERROR_DATA
An area that describes the last thing that CICS did, before the abend. It contains the following:
SRP_CICS_EC_PSW
8-character field that contains the extended control (EC) mode program status word (PSW)
SRP_CICS_PSW16
16-character field that contains the 128-bit PSW
SRP_CICS_EC_INT
8-character field that contains the interrupt code and ILC
SRP_CICS_REGST
64-character field that contains the contents of the general-purpose (GP) registers
SRP_CICS_EXEC_KEY
1 byte that contains the PSW key, in the form X'0n'.
SRP_SYSTEM_ERROR_DATA
An area that describes the last thing the system did, before the abend. It contains the following:
SRP_SYSTEM_EC_PSW
8-character field that contains the EC mode PSW
SRP_SYSTEM_PSW16
16-character field that contains the 128-bit PSW
SRP_SYSTEM_EC_INT
8-character field that contains the interrupt code and ILC
SRP_SYSTEM_REGST
64-character field that contains the contents of the GP registers
SRP_SYSTEM_EXEC_KEY
1 byte that contains the PSW key, in the form X'0n'.
SRP_ERROR_FP_REGS
An area that describes the contents of the floating point registers at the time of the abend. It contains:
SRP_FP_REG_0
FP register 0
SRP_FP_REG_2
FP register 2
SRP_FP_REG_4
FP register 4
SRP_FP_REG_6
FP register 6
SRP_ADDITIONAL_REG_INFO
An area that contains additional register information.
SRP_ADDITIONAL_REGS_FLAG
1 byte that contains flags:
SRP_CICS_GPR64_AVAIL
The 64-bit CICS GP registers are available.
SRP_SYSTEM_GPR64_AVAIL
The 64-bit system GP registers are available.
SRP_ADDITIONAL_FPR_AVAIL
Additional FP registers are available.
SRP_CICS_GP64_REGS
128-byte area that contains the CICS 64-bit GP registers at the time of the abend.
SRP_SYSTEM_GP64_REGS
128-byte area that contains the system 64-bit GP registers at the time of the abend.
SRP_ADDITIONAL_FPR_REGS
132-byte area that contains additional FP registers at the time of the abend.
SRP_FP_REGS
128-byte area that contains all the FP registers at the time of the abend.
SRP_FPC_REG
4-byte field that contains the FPC register at the time of the abend.
SRP_VR_REGS
512-byte area that contains all the Vector registers at the time of the abend.

If flag SRP_NOT_CICS_RB is set, SRP_CICS_ERROR_DATA describes the last thing that CICS did before the abend and SRP_SYSTEM_ERROR_DATA describes the last thing that the system service (for example, z/OS® Communications Server, VSAM, or MVS) did.

You can map the SRP_ERROR_DATA that is passed to the XSRAB exit by using the DFHSRED TYPE=DSECT macro. The format of SRP_ERROR_DATA is shown in SRED - System recovery error data.

Return codes
UERCNOCA
Abnormally terminate the task with abend code ASRB. Do not cancel any program-level abend exits that are associated with this task.
UERCCANC
Abnormally terminate the task with abend code ASRB. Cancel any program-level abend exits that are associated with this task.
UERCCICS
Abnormally terminate CICS.
XPI calls
Because CICS invokes the exit XSRAB in an error environment, you can use only a subset of the XPI calls.

Only TRACE_PUT is available for general use.

You can use WAIT_MVS, but only after the exit program determines (from the SRP_CICS_CODE and SRP_USER_CODE fields) that the abend occurred in user application code, and not in CICS code.

Important:
  • Take care when coding a program to run at the XSRAB exit point. If your exit program causes the system recovery program to be reentered (for example, if a program check occurs), CICS terminates abnormally with a DFHSR06xx message.
  • The default return code is UERCNOCA, which ensures that the task abends if the exit is in error.
  • There is no UERCNORM return code at this exit point, because the exit is invoked after a failure.
  • The exit should not set the return code UERCPURG.