![]() |
![]() |
e-docs > Tuxedo > ATMI COBOL Function Reference > Section 3(cbl) - COBOL Functions |
ATMI COBOL Function Reference
|
Name
TPTERM() - leaves an application
Synopsis
01 TPSTATUS-REC.
COPY TPSTATUS.
CALL "TPTERM" USING TPSTATUS-REC.
Description
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.
Errors
Upon failure, TPTERM() sets TP-STATUS to one of the following values:
See Also
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |