Sends a confirmation request to the remote program and waits
for a reply. A status info value of 0 indicates that the remote
TP has returned a positive confirmation response (the equivalent
of an MCConfirmed).
Description |
 |
The MCConfirm intrinsic is used to determine whether the two
sides of a conversation are synchronized. It can be used only if
the conversation is allocated with a synchronization level of CONFIRM
(that is, if the MCAllocate or MCGetAllocate intrinsic was called with the SyncLevel parameter set to 0). It is used to request confirmation
from the remote TP and wait for a reply. A TP must be in Send state
to call MCConfirm.
How confirmation is used in a conversation is up to the TP programmers.
It can be used, for example, to verify that a conversation has been
allocated properly and that the remote TP is ready to receive data.
It can also be used after data is sent, to verify that the remote
TP received everything the local TP sent.
When MCConfirm executes, the send buffer is flushed, and then
a confirmation request is sent to the remote TP. The remote TP is
placed in Confirm state. It may respond to the confirmation request
with the equivalent of any of the intrinsics listed in Table 5-5 “Intrinsics With Confirmation Responses”. Table 5-5 “Intrinsics With Confirmation Responses” also lists the conversation
state of the remote TP after issuing each intrinsic. See Chapter 4 “Conversation States” for more information on states and the intrinsics
that may be called from them.
Table 5-5 Intrinsics With Confirmation Responses
Intrinsic Callable from Confirm State | State of Remote TP After Execution |
---|
MCConfirmed | Receive state |
MCDeallocate (DeallocateType = ABEND) | Reset state |
MCSendError | Send state |
The conversation is suspended until the MCConfirm intrinsic completes.
Because this intrinsic causes the send buffer to be flushed,
it may be called after MCAllocate to determine whether the conversation was successfully
allocated on the remote side. See Chapter 6 “Buffer Management” for
more information on receiving allocation errors.
Some status info values commonly returned to the MCConfirm intrinsic are described below:
The remote TP has responded with the equivalent of MCConfirmed.
The conversation was not allocated with a synchronization
level of CONFIRM.
The conversation was not allocated properly by the remote
TP.
60 Program Error: Data may have been purged.
|
The remote TP has sent the equivalent of MCSendError.
Following is a complete list of status info values that may
be returned to the MCConfirm intrinsic.