AM3270/TR3271 Reference Manual

Details of the CRT Protocol
TR3271 Subdevice Protocols
086705 Tandem Computers Incorporated 6–3
standing READ requests (whose sizes may be substantial), it is possible that data
buffer space will quickly be exhausted.
Instead of issuing a READ, the application issues a CONTROL 22 (called a forerunner
to a READ), which in effect requires file-system buffer resources to be committed only
when TR3271 has data from the host. When TR3271 receives data from the host, it
notifies the application by completing the CONTROL request; the application then
should immediately get the space required and issue a READ in order to get the data.
Note that at the point of completing the CONTROL request, TR3271 resumes its
normal processing (it does not wait for the READ to arrive before it acknowledges the
data from the host).
Restrictions
The following restrictions apply to the two-step READ feature:
A forerunner request for a particular opener may not be queued behind
forerunner requests from the same opener. File-system error 88 (a CONTROL
READ is pending; a new READ is invalid) is returned if this invalid queuing is
attempted.
If a forerunner is issued immediately after another forerunner completes without
error (when a READ is expected), the second forerunner will be rejected with file-
system error 87 (awaiting a READ request but did not get it).
No further READs will be posted for the subdevice (that is, the READ request will
be blocked) until pending data is read by the opener that issued the forerunner (or
until that opener is closed). WRITE requests from any opener will be honored.
No timeout is imposed on the READ operation. The buffer remains queued until the
READ from the proper opener is received (or that opener closes). The READ request
should be issued as soon as possible after termination of the CONTROL 22.
CONTROL 22 Syntax
To invoke a two-step READ, the following CONTROL procedure is called:
CALL CONTROL (filenumber, 22, parameter [, tag]);
filenumber
is the number assigned to the subdevice at OPEN.
22
is the CONTROL operation.
parameter
is the size in bytes that will be issued for the actual call to READ.
tag
is optional, and is used for nowait I/O.