Exchange/RJE Manual

WRITE Procedure
Exchange/RJE System Procedure Calls
5–38 104698 Tandem Computers Incorporated
tag
INT(32):value
identifies individual nowait I/O operations when a single file can have two or
more nowait I/O operations outstanding at the same time. The value of
tag
is a
unique, arbitrary value that your program defines for each nowait I/O operation.
A subsequent call to AWAITIO that completes this I/O operation returns this
value to your program, identifying this I/O operation as the nowait I/O operation
that just completed.
If your program has no more than one outstanding nowait I/O operation against a
single file at one time, you can omit this parameter. In this case, the file number
returned by AWAITIO uniquely identifies the I/O operation that was completed.
If you opened the line server for wait I/O operations, omit this parameter.
Line Activity The line activity of the WRITE procedure depends on whether the call to WRITE
initiates a send operation or continues a previously initiated send operation.
Initial Call to WRITE
If this is the first call to WRITE or the first call after a completed receive operation, the
line is in the control state and neither the line server nor the remote system controls the
line. In this case, the call to WRITE initiates a bid for the line (sends an ENQ to the
remote system). After the bid has been accepted (the remote system responds with an
ACK 0), the line server transmits records (including the record from the first call to
WRITE) to the remote system as described below.
Subsequent Calls to WRITE
Each call to WRITE passes one record to the line server. The line server assembles the
records into blocks of one or more records for transmission to the remote system.
When your program passes a record to the line server that would cause the block
currently being assembled to be too large, that block is transmitted to the remote
system and the new record begins the next block. The last block is transmitted when
your program signals the end of text (ETX, which indicates the end of the file) by
calling CONTROL with the
operation
parameter equal to 2.
The number of records per block varies with the record size and the block size. The
block size for 2780 emulation is 400 bytes. The block size for 3780 emulation is 512
bytes. The block size for block mode is set by the BLOCKSIZE parameter when the
line server is started; it can range from 2 to 4084 bytes. In block mode without
blocking, each record is transmitted in a separate block.
For a detailed description of the block and record formats for 2780/3780 emulation,
block mode with 2780/3780 blocking and block mode without blocking, see the SEND
command in Section 3.