Technical data

COMMIT
COMMIT
Function
The COMMIT statement ends your database transaction, makes permanent all
changes made to the database since the last quiet point, and establishes a new
quiet point for this run unit.
General Format
COMMIT
STREAM stream name RETAINING {retaining list}
ON ERROR stment
NOT
ON ERROR stment2
END-COMMIT
stment
is an imperative statement executed for an on error condition.
stment2
is an imperative statement executed for a not on error condition.
Syntax Rules
1. The STREAM clause cannot be specified if the subschema entry (DB) does not
name a stream.
General Rules
1. The COMMIT statement ends the database transaction.
2. If you do not specify the STREAM clause, the COMMIT statement makes all
changes made to the database since the last quiet point for this run unit; a
new quiet point is established for the run unit.
3. If you specify the STREAM clause, the COMMIT statement makes all changes
made to the database since the last quiet point permanent for the specified
stream; a new quiet point is then established for the stream.
4. If you do not use the RETAINING clause (see Section 4.9.1, RETAINING
Clause), COMMIT:
Empties all keeplists
Resets all your currency indicators to null
Releases all realm and record locks
Makes visible any changes you made to the database
Terminates the READY mode for each target realm
5. If you do use the RETAINING clause, COMMIT:
Does not empty keeplists
Retains all currency indicators
Does not release realm locks
Demotes no-read record locks to read-only record locks, then releases
locks for all records except those in currency indicators or keeplists
Procedure Division 4–21