BEA Logo BEA Tuxedo Release 8.0

  BEA Home  |  Events  |  Solutions  |  Partners  |  Products  |  Services  |  Download  |  Developer Center  |  WebSUPPORT

 

   Tuxedo Documentation   |   COBOL Function Reference   |   Local Topics   |   Previous Topic   |   Next Topic   |   Contents

 


TPSETCTXT(3cbl)

Name

TPSETCTXT() - sets a context identifier for the current application association

Synopsis

01 TPCONTEXTDEF-REC.
COPY TPCONTEXTDEF.
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPSETCTXT" USING TPCONTEXTDEF-REC TPSTATUS-REC.

Description

TPSETCTXT() defines the context in which the current program operates. (Multithreaded COBOL applications are not currently supported.) Subsequent BEA Tuxedo calls reference the application indicated by CONTEXT in TPCONTEXTDEF-REC. The value of CONTEXT in TPCONTEXTDEF-REC should have been provided by a previous call to TPGETCTXT(). If the value of CONTEXT is TPNULLCONTEXT, then the program is disassociated from any BEA Tuxedo context. TPINVALIDCONTEXT is not a valid input value for CONTEXT in TPCONTEXTDEF-REC.

Return Values

Upon successful completion, TPSETCTXT() sets TP-STATUS to [TPOK].

Upon failure, TPSETCTXT() leaves the calling process in its original context and sets TP-STATUS to indicate the error condition.

Errors

Upon failure, TPSETCTXT() sets TP-STATUS to one of the following values:

[TPEINVAL]

Invalid arguments have been given.

[TPENOENT]

The value of CONTEXT in TPCONTEXTDEF-REC is not a valid context.

[TPEPROTO]

TPSETCTXT() has been called in an improper context. For example, it has been called in a process that has not called TPINITIALIZE() or that has called TPINITIALIZE() without specifying the TP-MULTI-CONTEXTS setting.

[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, TPGETCTXT(3cbl)

 

back to top previous page next page