Aborts the current transaction and rolls back any updates to the database performed by the transaction.
TRANSABORT {transaction-information} [THEN statement(s) | ELSE statement(s)]
transaction-information
Optional text to be saved in the transaction-abort record. It can be used
to identify a particular transaction or iteration of a repetitive transaction.
transaction-information can be text within double quotes or a
variable.
If you are using Transaction Logging, transaction-information can be used when listing a clean log or during a TL-RESTORE.
You can use transaction-information only if Transaction Logging is installed and enabled. transaction-information is not used in Transaction Handling.
statement(s) Either a THEN or an ELSE clause (or both). A statement must be included. The THEN clause is executed if the Transaction Abort is successful. The ELSE clause is executed if the transaction abort fails. One cause of such a failure would be when no transaction is active.
If no transaction-information parameter is supplied, the file-name and item-id containing the program performing the transaction along with the time and date is substituted.
Item locks that are released within a transaction boundary are held until successful execution of the TRANSABORT statement.