The Cancel_Conversation call (function name cmcanc) cancels any outstanding operation on a conversation (an operation returned with cm_operation_incomplete) and the conversation itself.
CM_ENTRY Cancel_Conversation(
unsigned char FAR *conversation_ID,
CM_INT32 FAR *return_code
);
The conversation must be in any state except RESET.
When the return code is cm_ok, the conversation state becomes RESET.
Cancel_Conversation can be called while another operation is active for the specified conversation_ID. This allows an application to end any CPI-C action, but will terminate the conversation. This call can be issued regardless of the current application processing mode. Any outstanding operations will return with cm_deallocated_abend as the return code.
The conversation is terminated by a Deallocate with deallocate_type set to ABEND_SVC. No log_data is sent. The system may be unable to do this immediately, but any delay is transparent to the program.
Note If Cancel_Conversation is called while there are outstanding Specify_Windows_Handle asynchronous calls, these calls are canceled. The return codes are set to canceled and a completion message is posted.