Exchange/RJE Manual

Step-by-Step Instructions
Using the Exchange/RJE Programmatic Interface
4–16 104698 Tandem Computers Incorporated
1. Call READ and read the first record received from the remote system. This is a
wait I/O operation.
2. Call WRITE and write the record that was received from the remote system by the
line server to the file. This is a nowait I/O operation.
3. Call READ and read the next record received from the remote system. This is a
wait I/O operation. However, it begins before the preceding write has completed;
both operations are performed concurrently.
4. Call AWAITIO and wait for the call to WRITE to complete.
5. Repeat steps 2 through 4 until an ETX (end of text or file) is received from the
remote system.
The above procedure illustrates just one of many ways to use nowait I/O operations to
receive files. Note that there is little benefit to be gained from using nowait I/O
operations with both the line server and the file. This is because there is nothing to do
while both the read and the write are in progress.
Receiving Transparent Text
When the line server returns error 301 with 1 in the first word of the buffer to a READ
call posted by your application, it means that the line server has received transparent
text. Your application should post the READ call to the line server with the read count
set to the record size to use when disassembling transparent records. The line server
then disassembles the transparent text blocks according to the specified record size.
When using standard 2780 mode or block mode with 2780 blocking and the
underlying IOP is Envoy, the line server checks that the record size of the incoming
text is the same as the record size specified by the application. If the record size is not
the same, the line server returns error 310, which denotes a record size mismatch error.
If the application receives error 310, it should abort the transmission.
When a READ call returns error 301 with 2 in the first word of the buffer, it signals the
end of the transparent data (the server is receiving normal text). You should post the
READ call to the line server with the read count set to the value to use for normal text.
This value should be as large or larger than the size of the largest normal text record
that you expect to receive from the remote system for this application.
Note that this discussion is dependent upon your use of the new protocol for
transparent text (SETMODE function 41
param1
.<5>=1). To use this protocol, you
must know the length of the transparent text records.