PURPOSE

TPGETLEV - check if a TUXEDO System/T transaction is in progress

SYNOPSIS


01 TPTRXLEV-REC.
   COPY TPTRXLEV.
01 TPSTATUS-REC.
  COPY TPSTATUS.
CALL "TPGETLEV" USING TPTRXLEV-REC TPSTATUS-REC.

DESCRIPTION

TPGETLEV returns to the caller the current transaction level. Currently, the only levels defined are TP-NOT-IN-TRAN and TP-IN-TRAN.

RETURN VALUES

Upon successful completion, TPGETLEV sets TP-STATUS to [TPOK] and sets values in TPTRXLEV-REC to either a TP-NOT-IN-TRAN to indicate that no transaction is in progress, or TP-IN-TRAN to indicate that a transaction is in progress.

ERRORS

Under the following conditions, TPGETLEV fails and sets TP-STATUS to:

[TPEPROTO]

TPGETLEV was called in an improper context.
[TPESYSTEM]

A System/T error has occurred. The exact nature of the error is written to a log file.
[TPEOS]

An operating system error has occurred.

NOTICES

When using TPBEGIN(3cbl), TPCOMMIT(3cbl) and TPABORT(3cbl) 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(3cbl). See buildserver(1) for details on linking resource managers that meet the XA interface into a server such that operations performed by that resource manager are part of a System/T transaction.

SEE ALSO

TPABORT(3cbl),
TPBEGIN(3cbl),
TPCOMMIT(3cbl),
TPSCMT(3cbl)