LU 6.2 API Application Programmer's Reference Guide (30294-90008)

82 Chapter5
Intrinsic Descriptions
MCConfirm
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. Table 5-5 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.
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:
0 Successful Completion.
The remote TP has responded with the equivalent of MCConfirmed.
31 Confirm not allowed.
The conversation was not allocated with a synchronization level of
CONFIRM.
50 Allocation Error.
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.
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