Skip navigation.

ATMI COBOL Function Reference

  Previous Next vertical dots separating previous/next from contents/index/pdf Contents View as PDF   Get Adobe Reader




TPTERM() - leaves an application




TPTERM() removes a client from a BEA Tuxedo ATMI 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.

Multi-contexting 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 multi-contexted 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



Skip navigation bar  Back to Top Previous Next