ATMI COBOL Function Reference
TPGETCTXT()
- retrieves a context identifier for the current application association
01 TPCONTEXTDEF-REC.
COPY TPCONTEXTDEF.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPGETCTXT" USING TPCONTEXTDEF-REC TPSTATUS-REC.
TPGETCTXT()
retrieves an identifier that represents the current application context and places that identifier in CONTEXT
in TPCONTEXTDEF-REC
. Typically, a COBOL application:
TPGETCTXT()
may be called in single-context applications as well as in multi-context applications.
Upon successful completion, TPGETCTXT
sets TP-STATUS
to [TPOK
] and places the program's context identifier in CONTEXT
in TPCONTEXTDEF-REC
. CONTEXT
is set to the current context ID, which may be represented by either:
TPNULLCONTEXT
, indicating that this program is not currently associated with a contextNote: TPINVALIDCONTEXT
cannot be returned in COBOL programs because this value is possible only in multithreaded programs.
Upon failure, TPGETCTXT
sets TP-STATUS
to one of the following values.
A BEA Tuxedo system error has occurred. The exact nature of the error has been written to a log file.
Introduction to the COBOL Application-Transaction Monitor Interface, TPSETCTXT(3cbl)