BEA Logo BEA Tuxedo Release 7.1

  Corporate Info  |  News  |  Solutions  |  Products  |  Partners  |  Services  |  Events  |  Download  |  How To Buy

 

   Tuxedo Doc Home   |   Reference   |   Topic List   |   Previous   |   Next   |   Contents

   BEA Tuxedo COBOL Function Reference

TPGETCTXT(3cbl)

Name

TPGETCTXT() - retrieves a context identifier for the current application association

Synopsis

01 TPCONTEXTDEF-REC.
COPY TPCONTEXTDEF.

01 TPSTATUS-REC.
COPY TPSTATUS.

CALL "TPGETCTXT" USING TPCONTEXTDEF-REC TPSTATUS-REC.

Description

TPGETCTXT() retrieves an identifier that represents the current application context and places that identifier in CONTEXT in TPCONTEXTDEF-REC. Typically, a COBOL application

  1. Calls TPINITIALIZE() with the TP-MULTI-CONTEXTS flag set.

  2. Calls TPGETCTXT() and saves the TPCONTEXTDEF-REC.

  3. Calls TPINITIALIZE(), again with the TP-MULTI-CONTEXTS flag.

  4. Calls TPGETCTXT() again and saves the returned context.

  5. Calls TPSETCTXT() to switch back to the first context.

TPGETCTXT() may be called in single-context applications as well as in multicontext applications.

Return Values

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:

Errors

Upon failure, TPGETCTXT sets TP-STATUS to one of the following values.

[TPEINVAL]

Invalid arguments have been given.

[TPESYSTEM]

A BEA Tuxedo system error has occurred. The exact nature of the error has been written to a log file.

[TPEOS]

An operating system error has occurred.

See Also

Introduction to the COBOL Application-Transaction Monitor Interface, TPSETCTXT(3cbl)