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



TPTERM() - leaves an application




TPTERM() removes a client from a BEA Tuxedo system application. If the client is in transaction mode, then the transaction is rolled back. When TPTERM() returns successfully, the caller can no longer perform BEA Tuxedo client operations. Any outstanding conversations are immediately disconnected.

If TPTERM() is called more than once (that is, if it is called after the caller has already left the application), no action is taken and success is returned.

Multicontexting Issues

After invoking TPTERM(), a program is placed in the TPNULLCONTEXT context. Most ATMI functions invoked by a program in the TPNULLCONTEXT context perform an implicit TPINITIALIZE(). Whether or not the call to TPINITIALIZE() succeeds depends on the usual determining factors, unrelated to context-specific issues.

Return Values

Upon successful completion, TPTERM() sets TP-STATUS to [TPOK]. Upon success in a multicontexted application, the application's current context is changed to TPNULLCONTEXT. It is the user's responsibility to use TPSETCTXT() to change the context subsequently, as desired.

Upon failure, TPTERM() returns -1 and sets TP-STATUS to indicate the error condition.


Upon failure, TPTERM() sets TP-STATUS to one of the following values.


TPTERM() was called in an improper context (for example, the caller is a server).


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


An operating system error has occurred.

See Also