AM3270/TR3271 Reference Manual

Details of the CRT Protocol
AM3270 Subdevice Protocols
4–12 086705 Tandem Computers Incorporated
outstanding READ requests (whose sizes may be substantial), it is possible that data
buffer space will quickly be exhausted.
Instead of issuing a normal 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 AM3270 has data from the subdevice. When AM3270 receives
data from the subdevice, 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, AM3270 resumes its normal processing (it does not wait for the READ to
arrive before it acknowledges the data from the terminal).
Restrictions
The user should be aware of the following restrictions when using the two-step READ
operation:
A forerunner request for a particular opener may not be queued behind
forerunner or READ requests from the same opener.
If a forerunner is issued immediately after another forerunner completes without
error (when a READ is expected), the second forerunner will be rejected.
No further READs or WRITEs 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).
No timeout is imposed on the READ operation. The buffer remains queued until
the READ from the proper OPENID is received or until 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 used for nowait opens.