Confirmation Processing

The sequence of events for confirmation processing is as follows:

  1. Establish the synchronization level.
  2. Send a confirmation request.
  3. Receive data and confirmation request.
  4. Respond to the confirmation request.
  5. Deallocate the conversation.

Using confirmation processing, a TP sends a confirmation request with the data; the partner 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.

Note  Although the example in this section does not show this, any TP can send or receive data, regardless of whether the TP is the invoking TP or the invokable TP.

The following example illustrates confirmation processing.

Issued by the invoking TP Issued by the invokable TP
TP_STARTED

MC_ALLOCATE

(synclevel=AP_CONFIRM_SYNC_LEVEL)

MC_SEND_DATA

(type=AP_SEND_DATA_CONFIRM)


RECEIVE_ALLOCATE

MC_RECEIVE_AND_WAIT

(primary_rc=AP_OK)

(rtn_status=AP_YES)

(what_rcvd=
AP_DATA_COMPLETE_CONFIRM)

MC_CONFIRMED
MC_SEND_DATA

(type=AP_SEND_DATA_DEALLOC_SYNC_LEVEL)


MC_RECEIVE_AND_WAIT

(primary_rc=AP_OK)

(rtn_status=AP_YES)

(what_rcvd=
AP_DATA_COMPLETE_CONFIRM_
DEALLOCATE)

MC_CONFIRMED
TP_ENDED
TP_ENDED

Establishing the Synchronization Level

The synclevel parameter of MC_ALLOCATE determines the synchronization level of the conversation. There are three possible synchronization levels:

Sending a Confirmation Request

MC_SEND_DATA with type AP_SEND_DATA_CONFIRM has two effects:

After issuing MC_SEND_DATA, the local TP waits for confirmation from the partner TP.

Receiving Data and Confirmation Request

The what_rcvd parameter of MC_RECEIVE_AND_WAIT indicates:

In the example, what_rcvd is ap_data_complete_confirm, indicating that the status is complete and a confirmation is requested.

Responding to a Confirmation Request

The partner TP issues MC_CONFIRMED to confirm receipt of data. This frees the local TP to resume processing.

Deallocating the Conversation

MC_SEND_DATA sends a confirmation request with the data when all of the following conditions are true: