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

112 Chapter5
Intrinsic Descriptions
MCRcvAndWait
NOTE
A TP cannot receive both data and control information in the same call
to MCRcvAndWait. If both data and control information have been
received in the receive buffer, a TP must make separate calls to
MCRcvAndWait for each one.
The only control information that can be received in the same
MCRcvAndWait call with data is the
RequestToSendReceived
notification.
If posting has been set on the specified conversation, MCRcvAndWait
ends posting.
The local TP does not have to call MCPrepToRcv to enter Receive state
before it calls MCRcvAndWait. A TP can call MCRcvAndWait directly from
Send state. The send buffer will be flushed, the remote TP will be
placed in Send state, and the local TP will be placed in Receive state.
When logical records sent by the remote are larger than the receive
buffer (4092 bytes on MPE V, or 32763 bytes on MPE XL), the local TP
must call MCRcvAndWait more than once to receive each record.
NOTE
If the local TP will be receiving data records larger than the receive
buffer, it must allocate more than one location for storing data. Data
received in the
Data
parameter during the first call to MCRcvAndWait
will be overwritten during the second call unless it is moved to another
location.
The MCRcvAndWait intrinsic differs from the MCRcvNoWait intrinsic in
the following ways:
1. MCRcvAndWait can be used to change the conversation state of the
local TP from Send state to Receive state. MCRcvNoWait can be
called only from Receive state.
2. MCRcvAndWait waits for information from the remote before
returning control to the calling TP. MCRcvNoWait does not wait for
information to arrive. It checks to see if any information is available
in the receive buffer, and if the buffer is empty, it returns a status
info value of +38 (Not Posted) and returns control to the TP.
3. MCRcvAndWait can receive 4092 bytes on MPE V, or 32763 bytes on
MPE XL, in a single intrinsic call. MCRcvNoWait can receive a
maximum of 4092 bytes in a single intrinsic call, on MPE V or
MPE XL.
Figure 5-5 shows a conversation in which both sides call MCRcvAndWait.
Notice that, when MCRcvAndWait is called from Send state, the TP that
called it is placed in Receive state and must wait for data to arrive
before it can continue processing. The MCRcvAndWait intrinsic does not
finish executing until information arrives for it to receive (or until the