TRANSEND Statement

Commits a transaction.

Syntax

TRANSEND {transaction-information} [THEN statement(s) ELSE statement(s)]

Syntax Elements

transaction-information
Optional text to be saved in the transaction-end 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 commit is successful. The ELSE clause is executed if the transaction end fails. One cause of such a failure would be when no transaction is active.

Operation

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 TRANSEND statement.

Go to top button