ROLLBACK

Function

Causes a database rollback to the last commit.

Syntax

ROLLBACK

Description

An automatic rollback is performed whenever Production Reporting aborts due to program errors. ROLLBACK is useful in testing or in certain error conditions.

ROLLBACK is an Production Reporting command and should not be used inside an SQL paragraph.

Note:

ROLLBACK can be used with DB2, ODBC, DDO, Teradata, and Oracle. For Sybase, use BEGIN TRANSACTION and ROLLBACK TRANSACTION within SQL paragraphs as in the following example. See the COMMIT command for an example of ROLLBACK.

Examples

if #error-status = 1
  rollback
  stop
end-if

See Also

COMMIT