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

TPDISCON(3cbl)

Name

TPDISCON() - take down a conversational connection

Synopsis

01 TPSVCDEF-REC.
COPY TPSVCDEF.

01
TPSTATUS-REC.
COPY TPSTATUS.

CALL "TPDISCON" USING
TPSVCDEF-REC TPSTATUS-REC.

Description

TPDISCON() immediately tears down the connection specified by COMM-HANDLE in TPSVCDEF-REC, the communications handle, and generates a TPEV-DISCONIMM event on the other end of the connection.

TPDISCON() can only be called by the initiator of the conversation. TPDISCON() can not be called within a conversational service on the communications handle with which it was invoked. Rather, a conversational service must use TPRETURN() to signify that it has completed its part of the conversation. Similarly, even though a program communicating with a conversational service can issue TPDISCON(), the preferred way is to let the service tear down the connection in TPRETURN(); doing so ensures correct results. If the initiator of the connection is a server, then TPRETURN() can also be used to cause an orderly disconnection. If the initiator of the connection is in a transaction, then TPCOMMIT() or TPABORT() can be used to cause an orderly disconnection.

TPDISCON() causes the connection to be torn down immediately (that is, abortive rather than orderly). Any data that has not yet reached its destination may be lost. TPDISCON() can be issued even when the program on the other end of the connection is participating in the caller's transaction. In this case, the transaction is aborted. Also, the caller does not need to have control of the connection when TPDISCON() is called.

Return Values

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

Errors

Under the following conditions, TPDISCON() fails and sets TP-STATUS to:

[TPEBADDESC]

COMM-HANDLE is invalid or is the communications handle with which a conversational service was invoked.

[TPETIME]

A timeout occurred. The communications handle is no longer valid.

[TPEPROTO]

TPDISCON() was called improperly.

[TPESYSTEM]

A BEA Tuxedo system error has occurred. The exact nature of the error is written to a log file. The communications handle is no longer valid.

[TPEOS]

An operating system error has occurred. The communications handle is no longer valid.

See Also

TPABORT(3cbl), TPCOMMIT(3cbl), TPCONNECT(3cbl), TPRECV(3cbl), TPRETURN(3cbl), TPSEND(3cbl)