A CPI-C program uses the Deallocate (CMDEAL) call to end a conversation abnormally. After the call has been executed successfully, the conversation_ID is no longer assigned to a conversation. Normally, a conversation is always ended together with the UTM process. Termination of a conversation by the CPI-C program is always regarded as abnormal. The value of deallocate_type must therefore be set to CM_DEALLOCATE_ABEND by the Set_Deallocate_Type (CMSDT) call before a Deallocate call is issued.
CMDEAL (conversation_ID, return_code)
Parameters
--> conversation_ID | Identifier of the conversation to be ended. |
<-- return_code | Result of the function call. |
Result (return_code)
CM_OK
The call is OK.
CM_PROGRAM_STATE_CHECK
The call is not permitted in the current state.
CM_PROGRAM_PARAMETER_CHECK
The value of conversation_ID is invalid.
CM_PRODUCT_SPECIFIC_ERROR
The value of deallocate_type has not been set to CM_DEALLOCATE_ABEND by a preceding Set_Deallocate_Type call.
State change
If the return code is CM_OK, the program enters the “Reset” state. In all other error situations, the program does not change its state.
Behavior in the event of errors
CM_PROGRAM_STATE_CHECK
Modify program.
CM_PROGRAM_PARAMETER_CHECK
Modify program.
CM_PRODUCT_SPECIFIC_ERROR
Modify the program and incorporate the Set_Deallocate_Type call.
CM_ENTRY Deallocate ( unsigned char CM_PTR conversation_ID, CM_RETURN_CODE CM_PTR return_code)