ATMI COBOL Function Reference
TPTERM()
- leaves an application
01
TPSTATUS-REC
.
COPY TPSTATUS.
CALL "TPTERM" USINGTPSTATUS-REC
.
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.
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.
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: