|
|
|
|
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.
The sync_level parameter of the MC_ALLOCATE verb determines the synchronization level of the conversation. Possible values for synchronization levels are:
AP_CONFIRM_SYNC_LEVEL under which the TPs can request confirmation of receipt of data and respond to such requests
AP_NONE under which confirmation processing does not occur
A third level, AP_SYNCPT (Syncpoint) can also be used, but requires additional software. For more information, see Syncpoint Support.
The MC_CONFIRM verb has two effects:
To flush the local LU's send buffer, which sends any data contained in the buffer to the partner TP
To send a confirmation request, which the partner TP receives through the what_rcvd parameter of a receive verb
The MC_CONFIRM verb does not complete until confirmation (or an indication that an error was detected) is received from the partner TP.
The what_rcvd parameter of the MC_RECEIVE_AND_WAIT verb indicates the following:
Status of the data received is complete or incomplete
Future processing expected of the local TP (for example, a confirmation request or an indication that it should begin to send data)
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).
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.
The MC_DEALLOCATE verb sends a confirmation request with the data when both of the following conditions are true:
The conversation's synchronization level (established by the sync_level parameter of the MC_ALLOCATE verb) is AP_CONFIRM_SYNC_LEVEL.
The dealloc_type parameter of the MC_DEALLOCATE verb is set to AP_SYNC_LEVEL.
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).
|
|
|
|
|