A logical unit of work is a sequence of SQL statements. Users control when logical units of work begin and end. They expect all SQL statements within a logical unit of work either to finish successfully as a unit or fail as a unit.
When the system fails, the logical units of work that were in progress at the time of the failure must be resolved. Usually, the application server automatically resolves outstanding logical units of work the next time you start the system.
If a failure occurs when a CICS online user was in the process of ending (committing) a logical unit of work, your intervention may be required. The logical units of work that were being committed at the time of failure are in-doubt logical units of work.
In the CICS subsystem, the CICS restart resynchronization facility automatically resolves in-doubt units of work when you enter the CIRB or CIRA transactions. To activate this facility, you must update the CICS tables to include the resynchronization transactions.
You must manually resolve in-doubt logical units of work if the CICS restart resynchronization facility fails. The procedures are listed below.
If you enter the CIRB or CIRA transaction without resolving the in-doubt logical units of work, the CIRB transaction lists the units that must be resolved, issues diagnostic messages, and ends.
To resolve in-doubt logical units of work, you must enter the SHOW ACTIVE, SHOW CONNECT or SHOW SYSTEM command. (The latter two issue the SHOW ACTIVE command internally.) The SHOW ACTIVE command determines the status of the logical units of work. The agents that you must force are indicated in the SHOW ACTIVE display by the phrase "IS PREPARED FOR COMMIT OR ROLLBACK". For example, in VM:
+--------------------------------------------------------------------------------+
| User Agent 7 User ID: JONES is prepared |
| for commit or rollback |
| VM ID= VSE1 COORDINATOR= DBDCCICS RESOURCE ADAPTER= 0 |
| TRANSACTION= TPSP CICS SIGNON= PETER TERMINAL= L012 |
+--------------------------------------------------------------------------------+
And in VSE,
+--------------------------------------------------------------------------------+
|F4 004 User Agent 7 User ID: JONES is prepared |
|F4 004 for commit or rollback |
|F4 004 COORDINATOR= DBDCCICS RESOURCE ADAPTER= 0 |
|F4 004 TRANSACTION= TPSP CICS SIGNON= PETER TERMINAL= L012 |
+--------------------------------------------------------------------------------+
The fields in the SHOW ACTIVE display have the following meanings:
The CICS SIGNON and TERMINAL values may be blank if the data was not available to the application server.
If TRANSACTION=CISQ or if the transaction accessed only the application server, you should commit the logical unit of work. (CISQ is the default CICS transaction identifier for the ISQL facility.) Use the FORCE command, described on page ***. For the above example, you enter:
FORCE 7 COMMIT |
If the transaction accessed multiple resources, you should contact the transaction owner. Otherwise, see the DB2 Server for VSE System Administration, or DB2 Server for VM System Administration manual for more information on deciding whether to force a commit or roll back.
Application server processing continues when logical units of work are in-doubt, but: