To allow the caller to wait on an ECB, use request code 24. This allows receiver programs written in languages that do not support a WAIT service to wait for input.
The following RPB fields must be set up before the call:
|
Bytes |
Field Name |
Set to... |
|
00-03 |
RPLEN |
56 |
|
04-05 |
REQUEST |
24 |
|
12-15 |
WORKADDR |
address of 128 byte work area |
|
20-23 |
ECBADDR |
address of the ECB |
The following RPB Field is returned after the call:
|
Bytes |
Field Name |
Set to... |
|
08-11 |
RETCODE |
see below |
The following return codes are possible:
Request completed successfully-the ECB has been posted
The ECB was not 0 on entry to this function-it might have been already posted
The requestor is not in primary addressing mode
PPI is not active
PPI requests are not supported
Important! This function should only be used if your programming language does not support a WAIT facility. Unpredictable results can occur if the PPI subsystem is terminated while you are waiting using this request.
The ECB address is returned by a request code 4 (define a receiver).
You can wait using request code 24 after receiving a return code 30 from receive.
Remember to test the ECB post code in the last byte of the ECB for 0 (data available) or 99 (PPI shutting down).