Previous Topic: @ROLLBACK ExampleNext Topic: #ROLLBAK Syntax


#ROLLBAK—rolls back uncommitted changes made to the database

The #ROLLBAK statement rolls back uncommitted changes made to the database through an individual run unit or through all database sessions associated with a task. A task-level rollback also backs out all uncommitted changes made in conjunction with scratch, queue, and print activity.

Whether the changes are automatically backed out depends on the execution environment:

If CONTINUE is not specified, run units (and SQL sessions) impacted by the #ROLLBAK statement end, and their access to the database is terminated. If CONTINUE is specified, impacted database sessions remain active after the operation is complete.

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

Currency

Following a #ROLLBAK statement, all currencies are set to null. Unless the CONTINUE option is specified, the issuing program or task cannot perform database access through an impacted run unit without executing another @BIND/@READY sequence.