Confirm

The Confirm call (function name cmcfm) sends the contents of the local LU's send buffer and a confirmation request to the partner program and waits for confirmation. To avoid blocking for clients running Microsoft® Windows® version 3.x, use the Specify_Windows_Handle call. For Microsoft® Windows NT® and Windows 95, run a background thread for all CPI-C communications and preserve the foreground thread for user interface only.

CM_ENTRY Confirm(
  unsigned char FAR *conversation_ID,  
  CM_INT32 FAR *request_to_send_received,  
  CM_INT32 FAR *return_code            
);
 

Parameters

conversation_ID
Supplied parameter. Specifies the identifier for the conversation. The value of this parameter was returned by Initialize_Conversation or Accept_Conversation.
request_to_send_received
Returned parameter. Provides the request-to-send-received indicator. Possible values are:
CM_REQ_TO_SEND_RECEIVED
The partner program issued Request_To_Send, which requests the local program to change the conversation to RECEIVE state.
CM_REQ_TO_SEND_NOT_RECEIVED
The partner program did not issue Request_To_Send. This value is not relevant if return_code is set to CM_PROGRAM_PARAMETER_CHECK or CM_PROGRAM_STATE_CHECK.
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. The partner program issued the Confirmed call.
cm_operation_not_accepted
Primary return code; a previous operation on this conversation is incomplete.
cm_operation_incomplete
Primary return code; the operation has not completed (processing mode is nonblocking only) and is still in progress. The program can issue Wait_For_Conversation to await the completion of the operation, or Cancel_Conversation to cancel the operation and conversation. If Specify_Windows_Handle has been called, the application should wait for notification by a Windows message and not call Wait_For_Conversation.
cm_program_parameter_check
Primary return code; one of the following occurred:
cm_program_state_check
Primary return code; one of the following occurred:
cm_product_specific_error
Primary return code; a product-specific error occurred and has been logged in the product's error log.
cm_conversation_type_mismatch
Primary return code; the partner LU or program does not support the conversation type (basic or mapped) specified in the allocation request.
cm_pip_not_specified_correctly
Primary return code; the allocation request was rejected by a non-CPI-C LU 6.2 TP. The partner program requires one or more PIP data variables, which are not supported by CPI-C.
cm_security_not_valid
Primary return code; the user identifier or password specified in the allocation request is not accepted by the partner LU.
cm_sync level_not_supported_pgm
Primary return code; the partner program does not support the synchronization level specified in the allocation request.
cm_tpn_not_recognized
Primary return code; the partner LU does not recognize the program name specified in the allocation request.
cm_tp_not_available_no_retry
Primary return code; the partner LU cannot start the program specified in the allocation request because of a permanent condition. The reason for the error may be logged on the remote node. Do not retry the allocation until the error has been corrected.
cm_tp_not_available_retry
Primary return code; the partner LU cannot start the program specified in the allocation request because of a temporary condition. The reason for the error may be logged on the remote node. Retry the allocation.
cm_program_error_purging
Primary return code; one of the following occurred:
cm_resource_failure_no_retry
Primary return code; one of the following occurred:
cm_resource_failure_retry
Primary return code; the conversation was terminated prematurely because of a temporary condition, such as modem failure. Retry the conversation.
cm_deallocated_abend
Primary return code; the conversation has been deallocated for one of the following reasons:
cm_deallocated_abend_svc
Primary return code; the conversation has been deallocated for one of the following reasons:

If the conversation is in RECEIVE state for the partner program when this call is issued by the local program, data sent by the local program and not yet received by the partner program is purged.

cm_deallocated_abend_timer
Primary return code; the conversation has been deallocated because the partner program issued Deallocate with the type parameter set to ABEND_TIMER. If the conversation is in RECEIVE state for the partner program when this call is issued by the local program, data sent by the local program and not yet received by the partner program is purged.
cm_svc_error_purging
Primary return code; while in SEND state, the partner program or partner LU issued Send_Error with the type parameter set to SVC. Data sent to the partner program may have been purged.

State Changes

The conversation can be in SEND or SEND_PENDING state when Confirm is issued.

State changes, summarized in the following table, are based on the value of the return_code parameter.

return_code New state
cm_ok
    Call was issued in SEND state No change
    Call was issued in SEND_PENDING state SEND
cm_program_error_purging RECEIVE
cm_svc_error_purging RECEIVE
cm_conversation_type_mismatch RESET
cm_pip_not_specified_correctly RESET
cm_security_not_valid RESET
cm_sync_level_not_supported_pgm RESET
cm_tpn_not_recognized RESET
cm_tp_not_available_no_retry RESET
cm_tp_not_available_retry RESET
cm_resource_failure_no_retry RESET
cm_resource_failure_retry RESET
cm_deallocated_abend RESET
cm_deallocated_abend_svc RESET
cm_deallocated_abend_timer RESET
All others No change

Remarks

In response to Confirm, the partner program normally issues Confirmed to confirm that it has received the data without error. (If the partner program encounters an error, it issues Send_Error or uses Deallocate to abnormally deallocate the conversation.)

The program can issue Confirm only if the conversation's synchronization level is CM_CONFIRM.

Confirm waits for a response from the partner program. A response is generated by one of the following CPI-C calls in the partner program:

Confirmed

Send_Error

Deallocate with the conversation's deallocate type set to CM_DEALLOCATE_ABEND