To allow a defined, active receiver to receive a data buffer, use request code 22. The next buffer in the receiver buffer queue is made available in the user-provided area.
The RPB fields in the following table must be set up before the call:
|
Bytes |
Field Name |
Set to... |
|---|---|---|
|
00–03 |
RPLEN |
56. |
|
04–05 |
REQUEST |
22. |
|
06–07 |
RECOPT |
A recovery option as required. |
|
12–15 |
WORKADDR |
The address of a 128-byte work area. |
|
16–19 |
ASCBADDR |
The receiver ASCB address. |
|
20–23 |
ECBADDR |
The receiver ECB address—this field is set only when RETCODE 30 is returned. |
|
24–31 |
RECVERID |
The target receiver ID. |
|
32–35 |
BUFFLEN |
The length of the data buffer to send. |
|
36–39 |
BUFFADDR |
The address of the data buffer to send. |
The RPB fields in the following table are returned after the call:
|
Bytes |
Field Name |
Set to... |
|---|---|---|
|
08–11 |
RETCODE |
The return code. |
|
16–23 |
SENDERID |
The ID of the sender of this buffer. |
|
32–35 |
BUFFLEN |
The actual data buffer length. |
The following return codes are possible:
Request completed successfully.
The requestor is not in primary addressing mode.
PPI is not active.
The ASCB address is not correct.
The receiver program is not defined.
PPI requests are not supported.
No data buffers are in the receiver buffer queue.
The receiver buffer size is not large enough for the incoming data buffer.
Buffer length is invalid.
The receiver buffer queue is full.
ESTAE could not be established as requested.
Sender ID is invalid.
A processing error occurred.
The correct ASCB address is required. This address is the ASCB address provided when the receiver was defined.
One data buffer at a time can be received. They are provided first-in-first-out order. If the call is successful, the sender ID of the sending program is provided.
The length of the incoming buffer is provided in the BUFFLEN field after the call. If a return code 31 (buffer too small) is given, BUFFLEN contains the required length to receive the buffer successfully. The call can be reissued after obtaining a large enough buffer.
If no data is queued, a return code of 30 is given and the ECBADDR field is set to the ECB address, as returned by DEFINE RECEIVER. The receiver can wait (using the WAIT macro or request code 24) until more data arrives.
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |