Cancel_Conversation

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            
);
 

Parameters

conversation_ID
Returned parameter. Specifies the identifier for the conversation. The value of this parameter was returned by Initialize_Conversation or Accept_Conversation.
return_code
The code returned from this call. The valid return codes are listed below.

Return Codes

cm_ok
Primary return code; the call executed successfully.
cm_program_parameter_check
Primary return code; the value specified by conversation_ID is invalid.
cm_product_specific_error
Primary return code; a product-specific error occurred and has been logged in the product's error log.

State Changes

The conversation must be in any state except RESET.

When the return code is cm_ok, the conversation state becomes RESET.

Remarks

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.