When the system is restarted after a failure, files under commitment control are automatically restored to their status at the last commitment boundary. For additional information about commitment control, see Using Commitment Control.
Commitment control can be scoped at two levels, the activation group level and the job level. Refer to the section "Commitment Control Scoping" in ILE Concepts for further information.
If a job or activation group ends abnormally (either because of user or system error), files under commitment control are restored as part of job or activation group termination to the files' status at the last commitment boundary. The commitment control boundary is determined by the commitment control scope chosen for the program.
Because files under commitment control are rolled back after system or process failure, this feature can be used to help in restarting. You can create a separate record to store data that may be useful should it become necessary to restart a job. This restart data can include items such as totals, counters, record key values, relative key values, and other relevant processing information from an application.
If you keep the restart data mentioned above in a file under commitment control, the restart data will also be permanently stored in the database when a COMMIT statement is issued. When a ROLLBACK occurs after job or process failure, you can retrieve a record of the extent of processing successfully processed before failure. Note that the above method is only a suggested programming technique and will not always be suitable, depending on the application.
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.