Shunted units of work
A shunted unit of work is one awaiting resolution of an indoubt failure, a commit failure, or a backout failure. The CICS® recovery manager attempts to complete a shunted unit of work when the failure that caused it to be shunted has been resolved.
A unit of work can be unshunted and then shunted again (in theory,
any number of times). For example, a unit of work could go through
the following stages:
- A unit of work fails indoubt and is shunted.
- After resynchronization, CICS finds that the decision is to back out the indoubt unit of work.
- Recovery manager unshunts the unit of work to perform backout.
- If backout fails, it is shunted again.
- Recovery manager unshunts the unit of work to retry the backout.
- Steps 4 and 5 can occur several times until the backout succeeds.
These situations can persist for some time, depending on how long
it takes to resolve the cause of the failure. Because it is undesirable
for transaction resources to be held up for too long, CICS attempts to release as many resources as
possible while a unit of work is shunted. This is generally achieved
by abending the user task to which the unit of work belongs, resulting
in the release of the following:
- Terminals
- User programs
- Working storage
- Any LU6.2 sessions
- Any LU6.1 links
- Any MRO links
The resources CICS retains include:
- Locks on recoverable data. If the unit of work is shunted indoubt, all locks are retained. If it is shunted because of a commit- or backout-failure, only the locks on the failed resources are retained.
- System log records, which include:
- Records written by the resource managers, which they need to perform recovery in the event of transaction or CICS failures. Generally, these records are used to support transaction backout, but the RDO resource manager also writes records for rebuilding the CICS state in the event of a CICS failure.
- CICS recovery manager records,
which include identifiers relating to the original transaction such
as:
- The transaction ID
- The task ID
- The CICS terminal ID
- The z/OS® Communications Server SNA LUNAME
- The user ID
- The operator ID.