OpenTP1 Version 7 Programming Reference COBOL Language
TPDISCON - Terminate a conversational service connection abortively
Format
01 TPSVCDEF-REC. COPY TPSVCDEF. 01 TPSTATUS-REC. COPY TPSTATUS. CALL "TPDISCON" USING TPSVCDEF-REC TPSTATUS-REC. |
Description
TPDISCON immediately terminates the connection specified by COMM-HANDLE and generates a TPEV-DISCONIMM event on the other end of the connection.
TPDISCON can be called only by the originator of the conversation. TPDISCON cannot be called within a conversational service on the communication 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 terminate the connection in TPRETURN; doing so ensures correct results.
TPDISCON causes the connection to be terminated immediately (that is, abortively 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 must be rolled back. Also, the caller does not need to have control of the connection when TPDISCON is called.
<<Data areas>>
<<TPSVCDEF-REC
Specify the communication handle of the connection indicated by COMM-HANDLE to be aborted.>>
<<TPSTATUS-REC
Will be assigned the return value indicating the result of TPDISCON execution.>>
Return value
Upon successful completion, TPDISCON sets TP-STATUS to TPOK.
Errors
Under the following conditions, TPDISCON fails and sets TP-STATUS to one of the following values:
See also
TPCONNECT, TPRECV, TPRETURN, TPSEND.
<<Notes on use with OpenTP1>>
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.