Sending and Receiving Data
- Transmission of data such that one data record on the sender's side is received as the same
data record on the receiver's side:
The SEND request will post to the receiver's side the length of the data area to be sent (in the IJBXCNTL field). The receiver obtains the needed storage and issues RECEIVE.
- Transmission of data such that the sender provides a list of data areas to be sent, and the
receiver collects the concatenated data into one data area (the length being the sum of the sender's
data area lengths):
The concatenated data length is posted at SEND time to the receiver's side. The receiver dynamically obtains the needed storage and issues RECEIVE.
The programs may choose at SEND time whether to use method 1 or method 2.
- A SEND - RECEIVE protocol:
If this protocol is used, the sender is posted when the receiver has accepted the sent data via the RECEIVE request. At this time, the connection is available for the next data transmission request.
- A SENDR - RECEIVE - REPLY protocol:
When using this protocol, the sender requests a reply from the receiver. The sender is posted when the receiver sends a reply back upon receiving the data. XPCC transfers the reply data into a reply area, which has to be provided by the sender at SEND time (with the XPCCB REPAREA operand).
- A SENDI - SENDI protocol:
When using this protocol, SENDI must be issued alternately from both partners, where the first SENDI starts the communication. This protocol requires that both partners have defined buffers at CONNECT time. These buffers are used as receive buffers when SENDI is executed.
If the predefined receive buffer is too small, XPCC switches to the normal SEND-RECEIVE protocol. The receiver is notified by the switch in IJBXREAS. After the RECEIVE has been executed, return to the SENDI protocol is recommended. If an error situation forces one of the partners to break the SENDI sequence, switching to the SEND-RECEIVE protocol is possible.
The SENDI protocol with a data length of zero can be used as a simple WAIT/POST mechanism between tasks in different partitions.