How changes are made to data
IBM® MQ must interact with other subsystems to keep all the data consistent. This topic contains information about units of recovery, what they are and how they are used in back outs.
Units of recovery
A unit of recovery begins with the first change to the data after the beginning of the program or following the previous point of consistency; it ends with a later point of consistency. Figure 1 shows the relationship between units of recovery, the point of consistency, and an application program. In this example, the application program makes changes to queues through MQI calls 1 and 2. The application program can include more than one unit of recovery or just one. However, any complete unit of recovery ends in a commit point.
For example, a bank transaction transfers funds from one account to another. First, the program subtracts the amount from the first account, account A. Then, it adds the amount to the second account, B. After subtracting the amount from A, the two accounts are inconsistent and IBM MQ cannot commit. They become consistent when the amount is added to account B. When both steps are complete, the program can announce a point of consistency through a commit, making the changes visible to other application programs.
Normal termination of an application program automatically causes a point of consistency. Some program requests in CICS® and IMS programs also cause a point of consistency, for example, EXEC CICS SYNCPOINT.