TPABORT - abort current TUXEDO System/T transaction
01 TPTRXDEF-REC.
COPY TPTRXDEF.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPABORT" USING TPTRXDEF-REC TPSTATUS-REC.
TPABORT signifies the abnormal end of a transaction. When this call returns, all changes made to resources during the transaction are undone. Like TPCOMMIT(3cbl), this routine can be called only by the initiator of a transaction. Participants (that is, service routines) can express their desire to have a transaction aborted by calling TPRETURN(3cbl) with TPFAIL.
If TPABORT is called while communication handles exist for outstanding replies, then upon return from the routine, the transaction is aborted and those communications handles associated with the caller's transaction are no longer valid. Communications handles not associated with the caller's transaction remain valid.
For each open connection to a conversational server in transaction mode, TPABORT will send a TPEV-DISCONIMM event to the server, whether or not the server has control of a connection. Connections opened before TPBEGIN(3cbl) or with the TPNOTRAN setting (that is, not in transaction mode) are not affected.
Currently, TPABORT's argument, TPTRXDEF-REC, is reserved for future use.
Upon successful completion, TPABORT sets TP-STATUS to [TPOK].
Under the following conditions, TPABORT fails and sets TP-STATUS to:
When using TPBEGIN(3cbl), TPCOMMIT(3cbl) and TPABORT to delineate a System/T transaction, it is important to remember that only the work done by a resource manager that meets the XA interface (and is linked to the caller appropriately) has transactional properties. All other operations performed in a transaction are not affected by either TPCOMMIT(3cbl) or TPABORT.