Nonerror conditions
Here are some situations for commitment control in which no errors occur.
- A commit or rollback operation is run and no resources are under commitment control. This allows you to include commit or rollback operations in your program without considering whether there are resources under commitment control. It also allows you to specify a commit identification before making any committable changes.
- A commit or rollback operation is run and there are no uncommitted resource changes. This allows you to include commit and rollback operations within your program without considering whether there are uncommitted resource changes.
- A file under commitment control is closed and uncommitted records exist. This situation allows another program to be called to perform the commit or rollback operation. This occurs regardless of whether the file is shared. This function allows a subprogram to make database changes that are part of a transaction involving multiple programs.
- A job ends, either normally or abnormally, with uncommitted changes for one or more commitment definitions. The changes for all commitment definitions are rolled back.
- An activation group ends with pending changes for the activation-group-level commitment definition. If the activation group is ending normally and there are no errors encountered when closing any files opened under commitment control scoped to the same activation group that is ending, an implicit commit is performed by the system. Otherwise, an implicit rollback is performed.
- A program accesses a changed record again that has not been committed. This allows a program to:
- Add a record and update it before specifying the commit operation.
- Update the same record twice before specifying the commit operation.
- Add a record and delete it before specifying the commit operation.
- Access an uncommitted record again by a different logical file (under commitment control).
- You specify LCKLVL(*CHG or *CS) on the STRCMTCTL command and open a file with a commit operation for read-only. In this case, no locks occur on the request. It is treated as if commitment control is not in effect, but the file does appear on the WRKJOB menu option of files under commitment control.
- You issue the STRCMTCTL command and do not open any files under commitment control. In this situation, any record-level changes made to the files are not made under commitment control.
Parent topic:
Commitment control errors