Exchange/SNA Manual

WRITEREAD Procedure
Exchange/SNA System Procedure Calls
5–24 104700 Tandem Computers Incorporated
WRITEREAD
Procedure
The WRITEREAD procedure writes a record from your program to the specified
subdevice for transmission to the host, or reads a record sent by the host to the
specified subdevice.
CALL WRITEREAD (
filenum
,
buffer
,
write-count
,
read-count
, [
count-read
]
, [
tag
] );
filenum
INT:value
is the file number of a previously opened subdevice supported by the
Exchange/SNA line server. The number you specify here is the number returned
by the call to OPEN that opened the subdevice.
buffer
INT:ref:*
For a write operation, this array contains the record to be sent to the host.
For a read operation, this array returns the record received from the host.
write-count
INT:value
For a write operation,
write-count
is the size, in bytes, of the record to be sent
to the host. The allowed range is from 1 through 255 bytes unless your host
subsystem is JES2, in which case the range is from 1 through 254.
For a read operation,
write-count
must be 0.
read-count
INT:value
For a read operation,
read-count
is the maximum number of bytes your
program expects to read. This number should be as large or larger than the size of
the largest record you expect to receive from the host.
read-count
must be no
larger than the size of
buffer
. The maximum record size that the line server can
receive is 255 bytes.
If the record is larger than
read-count
bytes, the record is truncated to
read-
count
bytes.
For a write operation,
read-count
must be 0.