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


#FINISH—commits changes to the database

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

If the finish 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 #FINISH 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 #FINISH statement end, and their access to the database is terminated.

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

Currency

Following the successful execution of a #FINISH request, all currencies are set to null and the issuing task cannot perform database access through an impacted run unit without executing an @BIND/@READY sequence.