Previous Topic: @COMMIT Status CodesNext Topic: #COMMIT Syntax


#COMMIT—commits changes made to the database

The #COMMIT statement commits changes made to the database through an individual run unit or through all database sessions associated with a task. A task-level commit also commits all changes made in conjunction with scratch, queue and print activity.

All locks held on current records except for select locks are released. #COMMIT simulates an #FINISH/@BIND/@READY sequence but does not relinquish control of database resources.

If the commit applies to an individual run unit and the run unit is sharing its transaction with another database session, the run unit's changes may not be committed at the time the #COMMIT statement is executed.

Note: For more information about the impact of transaction sharing, see the Navigational DML Programming Guide.

Run units (and SQL sessions) impacted by the COMMIT statement remain active after the operation is complete.

The #COMMIT statement is used in both the navigational and logical record facility environments. The #COMMIT TASK statement is also used in an SQL programming environment.

Currency

Specifying #COMMIT ALL sets all currencies to null.