Commit Prepare exit routine

The Commit Prepare exit routine is activated by IMS when an update or non-update transaction reaches a sync point.

Sync points include:

  • Get unique (GU) call to the message queue
  • Application-initiated checkpoint
  • Application program termination

On return, the exit routine must indicate whether it is prepared to commit all uncommitted changes initiated by the currently scheduled application. The exit routine can indicate whether or not the second phase of the commit process (commit continue) is required. If the transactions associated with the sync point processing are non-update transactions, they do not need to be committed, in which case the exit routine returns with a return code of X'C', requesting that IMS not call the Commit Continue exit routine.

Subsections:

Activating the routine

The exit routine is activated in key 7, supervisor state. The EEVT prefix (EEVTP) indicates a dependent region environment (dependent region TCB).

The EPL contains:

Offset
(hexadecimal)

Decimal Content
X'0' 0 Address of the parameter count field. The count field contains the value F'2'.
X'4' 4 Address of the EEVT prefix.
X'8' 8 Address of the 16-byte recovery token associated with this instance of the transaction. The recovery token identifies the unit of work across one or more subsystems.

Contents of register 15 on return

Processing of return codes received from the exit routine:
Return code Meaning
X'00'

Commit Prepare successful.

Action: IMS continues normal processing.

X'04'

Commit Prepare unsuccessful. The external subsystem is not prepared to perform commit processing at this time.

Action:

  • If the application is not terminating, IMS drives the Abort Continue exit routine. An internal ROLB is performed, which returns the input message to the application.
  • If the sync point was the result of the application terminating, IMS activates the Terminate Thread exit routine with the abort option. The application is terminated with abend U3055, updates are discarded, and the input message is re-enqueued.
X'08'

Commit Prepare unsuccessful. Prepare processing failed in the external subsystem.

Action: IMS activates the Abort Continue exit routine for all participating subsystems (if the application is not terminating) or the Terminate Thread exit routine with the abort option. The application terminates with abend U3044 and updates are discarded.

X'0C'

Commit Prepare successful for nonupdate transactions.

Action: IMS continues normal processing but does not call the Commit Continue exit routine. The external subsystem indicated that it is processing nonupdate transactions that do not need to be called for the second phase of commit processing. If the application program is terminating, IMS calls the Terminate Thread exit routine.

X'18'

Commit Prepare unsuccessful. The request was rejected because the recovery token presented by IMS at commit prepare already existed in the external subsystem. One of the following conditions occurred:

  • Outstanding recovery was not resolved by the Resolve indoubt exit routine, probably due to errors in the external subsystem.
  • IMS was cold started and the contents of the recovery token occurred once again.

Action: IMS pseudo abends the application program with abend U3053 and backs out the previous updates. The application is immediately rescheduled. The dependent region connection is reestablished whereupon a new recovery token is presented to the Signon exit routine.

X'20'

Should not occur.