Skip to content
CICS

Commit and rollback

Making a set of changes permanent together, or undoing them together, so a transaction never half-happens.

Also written unit of work, syncpoint, two-phase commit

A transfer between two accounts involves two changes: money out of one, money into the other. If the system failed between them, one account would be wrong. Commit and rollback exist so that cannot happen.

Changes are grouped into a unit of work. At the end, the transaction either commits, making every change in the unit permanent together, or rolls back, undoing all of them as if none had occurred. There is no in-between state, even if the system fails midway. Recovery on restart completes or reverses the unit.

In CICS, a transaction ending normally commits automatically, and a program can also commit part way through to start a fresh unit of work, or explicitly back out. In batch, programs handling large volumes usually commit periodically rather than at the very end, so a failure does not discard hours of work and a restart can resume from the last commit point.

When more than one resource is involved, a database and a queue for example, a two-phase protocol coordinates them so they agree.

Browse all 115 terms

Learn this properly.

Use Commit and rollback for real in Mainframe101, in your browser, with Zed beside you. Join the waitlist.

Early access and updates. No spam, unsubscribe any time.