Previous Page Contents Page Next Page

1.3 Confirmation Processing

Using confirmation processing, a TP sends a confirmation request with the data; the receiving TP confirms receipt of the data or indicates that an error occurred. Each time the two TPs exchange a confirmation request and response, they are synchronized.

The example of confirmation processing in Confirmation Processing shows two ways of confirming the transfer of data: requesting confirmation after sending the data (by using the CONFIRM verb), and requesting confirmation at the end of a transaction (by requesting confirmation on the DEALLOCATE verb). Confirmation can also be requested on the PREPARE_TO_RECEIVE verb; this asks the partner TP to confirm receipt of data, and then begin to send data itself. For more information, see State Changes. A pair of TPs may choose to use only one of these mechanisms; in the following example, the invoked TP uses the PREPARE_TO_RECEIVE verb without requesting confirmation; this simply tells the partner TP to send data.

Confirmation Processing

Invoking TPFlowInvoked TP
TP_STARTED
MC_ALLOCATE (sync_level = AP_CONFIRM_SYNC_LEVEL)
MC_SEND_DATA
MC_CONFIRM
->
RECEIVE_ALLOCATE
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_DATA_COMPLETE)
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_CONFIRM)
MC_SEND_ERROR
<-
(MC_CONFIRM returns, primary_rc = AP_PROG_ERROR_PURGING)
MC_PREPARE_TO_RECEIVE (ptr_type = AP_FLUSH)
<-
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_SEND)
MC_SEND_DATA
MC_CONFIRM
->
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_DATA_COMPLETE)
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_CONFIRM)
MC_CONFIRMED
<-
MC_DEALLOCATE (dealloc_type = AP_SYNC_LEVEL)
->
MC_RECEIVE_AND_WAIT (primary_rc = AP_OK) (what_rcvd = AP_CONFIRM_DEALLOCATE)
MC_CONFIRMED
<-
TP_ENDED TP_ENDED

1.3.1 Establishing the Synchronization Level

The sync_level parameter of the MC_ALLOCATE verb determines the synchronization level of the conversation. Possible values for synchronization levels are:

A third level, AP_SYNCPT (Syncpoint) can also be used, but requires additional software. For more information, see Syncpoint Support.

1.3.2 Sending a Confirmation Request

The MC_CONFIRM verb has two effects:

The MC_CONFIRM verb does not complete until confirmation (or an indication that an error was detected) is received from the partner TP.

1.3.3 Receiving Data and a Confirmation Request

The what_rcvd parameter of the MC_RECEIVE_AND_WAIT verb indicates the following:

When the invoked TP finishes receiving the complete data record ( what_rcvd = AP_DATA_COMPLETE), it issues the MC_RECEIVE_AND_WAIT verb again and receives a confirmation request ( what_rcvd = AP_CONFIRM).

1.3.4 Responding to the Confirmation Request

The invoked TP normally issues the MC_CONFIRMED verb to confirm receipt of data; this frees the invoking TP to resume processing.

If the invoked TP has detected an error in the received data, it can instead issue the MC_SEND_ERROR verb to indicate this error condition.

1.3.5 Deallocating the Conversation

The MC_DEALLOCATE verb sends a confirmation request with the data when both of the following conditions are true:

The what_rcvd parameter of the final MC_RECEIVE_AND_WAIT verb issued by the invoked TP contains AP_CONFIRM_DEALLOCATE , indicating that a confirmation of receipt of data is required before APPC will deallocate the conversation. The invoking TP waits for this confirmation until the invoked TP issues the MC_CONFIRMED verb to indicate that data was received successfully (or it could instead issue the MC_SEND_ERROR verb to indicate that data was not received successfully).

Previous Page Contents Page Top of Page Next page