CL Command Reference - ROLLBACK

CL Command List > ROLLBACK Reference

Description:

The Rollback (ROLLBACK) command is used to restart the current transaction and reestablish the last commitment boundary as the current commitment boundary for the commitment definition associated with the program issuing the command.

When the ROLLBACK command is issued:

. Changes made to database files and other commitment resources under commitment control for the commitment definition since the last commitment boundary was established are rolled back. Updates, additions, or deletions made to the database file¡¯s data since that commitment boundary are rolled back or removed, and the original entries are put back in the files. Records that were added to the files remain as deleted records. The files are repositioned to the last commitment boundary. Changes made to other commitment resources are rolled back as well.

. All record locks held for files opened under commitment control for the commitment definition are released.

. Locks on object level commitment control resources, acquired when the resources were created or changed during the transaction, are released.


Examples:

ROLLBACK

This command reestablishes the last commitment boundary (the point at which a Commit (COMMIT) command or Rollback (ROLLBACK) command was last issued) for the commitment definition associated with the program issuing the command.