Single mode reconnect for CICS

To configure the XA reconnect process to operate in a single attempt mode, set the ES_XA_RECONNECT environment variable.

In this configuration, each time a transaction is about to execute, an xa-ping is attempted. If this fails an xa-close and xa-open followed by an xa-ping are executed. If these fail, an error message is sent to the console indicating that the connection to the Resource Manager (RM) has been lost. The RM is not disabled.

On each attempt to execute a transaction, the same processing takes place until the connection to the RM is re-established. If the connection to the target RM is lost and the transaction requires the target RM, then the application program determines if action to recover the error is required, such as ABEND or rollback, or to display a message to the console. If the RM is not disabled, all XA error messages are displayed in the console. When the connection is re-established, a message is displayed in the console.

ES_XA_RECONNECT
Configures the XA reconnect process to operate in a single-attempt mode
Syntax
Windows:
ES_XA_RECONNECT=Y,wait-time[,retry_count]
UNIX:
ES_XA_RECONNECT=Y,wait-time[,retry_count]
export ES_XA_RECONNECT
Parameters
Y
Enables the reconnect process.
wait-time
The number of seconds to delay before triggering the XA recovery transaction after a two-phase commit failure and between each reschedule of the XA recovery transaction if the syncpoint phase 2 returns an RC 04. Maximum is 300.
retry_count
The number of recovery retries to attempt when the XA commit or rollback executed by the XA recovery transaction returns an RC-04. Default is 5.
Properties
Default: None
Comments
In case of failure, the following messages are sent to the console:
CASXO0054W XA recovery error RC=4 on commit in-doubt transaction RM: RM01 RC:  00004 XID: MF_CAS  DEMOMYREG           000000***********000010000000**        0000

When the maximum number of retries is reached, the following message is sent to the console:

CASXO0055S XA MAX recovery attempts, manually commit in-doubt transaction RM: RM01 RC:  00004 XID: MF_CAS  DEMOMYREG       000000***********000010000000**        0000
Example
ES_XA_RECONNECT=Y,120,4