OpenTP1 Version 7 Programming Reference COBOL Language

[Contents][Index][Back][Next]

TPCANCEL - Cancel a communication handle for an outstanding reply

Format

01  TPSVCDEF-REC.
    COPY  TPSVCDEF.
01  TPSTATUS-REC.
    COPY  TPSTATUS.
 
CALL "TPCANCEL" USING TPSVCDEF-REC TPSTATUS-REC.

Description

TPCANCEL cancels a communication handle, COMM-HANDLE, returned by TPACALL. It is an error to attempt to cancel a communication handle associated with a global transaction.

Upon success, COMM-HANDLE is no longer valid and any reply received (by the communication resource manager) on behalf of COMM-HANDLE is silently discarded.

<<Data areas>>

<<COMM-HANDLE

Specify the communication handle to be canceled.>>

<<TPSTATUS-REC

Will be assigned the return value indicating the result of TPCANCEL execution.>>

Return value

Upon successful completion, TPCANCEL sets TP-STATUS to TPOK.

Errors

Under the following conditions, TPCANCEL fails and sets TP-STATUS to one of the following values:

TPEBADDESC
COMM-HANDLE contains an invalid communication handle.

TPETRAN
COMM-HANDLE is associated with the caller's global transaction. COMM-HANDLE remains valid and the caller's current transaction is not affected.

TPEPROTO
TPCANCEL was called in an improper context.

TPESYSTEM
A communication resource manager system error has occurred. The exact nature of the error is determined in a product-specific manner.

TPEOS
An operating system error has occurred. The exact nature of the error is determined in a product-specific manner.

See also

TPACALL.