Exchange/RJE Manual
READ Procedure
Exchange/RJE System Procedure Calls
104698 Tandem Computers Incorporated 5–25
Receiving ETX, EOT, and DLE EOT
The remote system ends the transmission of a file by sending a block that ends in ETX
(or DLE ETX for transparent text) instead of ETB (or DLE ETB for transparent text).
When your program has read the last record in the last block, the next call to READ
returns with error number 1, which indicates an ETX (or DLE ETX) has been received
(the end of the file has been reached).
When the remote system sends an ETX, it does not necessarily indicate the end of the
transmission. The remote system retains control of the line until it sends an EOT (end
of transmission). Your program should call READ again after receiving an ETX. This
call to READ returns one of three error numbers, depending on what the remote
system sends following the ETX. These three error numbers are the following:
0 If the call to READ is completed successfully (CCE or error number 0), it means
the remote system is sending another file and
buffer
contains the first record
in that file.
163 If the call to READ returns error number 163, it means the remote system sent
an EOT (end of transmission). This indicates the remote system has finished its
transmission and has now relinquished control of the line. Your program can
now bid for the line (call WRITE) and, assuming the remote system accepts the
bid, send one or more files to the remote system.
164 If the call to READ returns error number 164, it means the remote system has
disconnected from the data communications line. The line server is now also
disconnected from the data communications line. No communication can take
place over the data communications line until a new connection is established.
To establish a new connection, your program must call SETMODE function 41.
It is possible that a call to READ after receiving an ETX will return an error number
other than one of the three listed above. This indicates a true error, such as data
communications line failure.
Considerations The READ procedure causes the line server to accept blocks transmitted by the remote
system. Each block can contain one or more records. The line server disassembles the
blocks into individual records and returns the records to your program one at a time
(one per call to READ).
Nowait I/O
If you opened the Exchange/RJE line server for nowait I/O, you must call AWAITIO
to complete an I/O operation initiated by a call to READ.
Block and Record Formats
For a description of the block and record formats accepted by 2780/3780-emulation
modes, block mode with 2780/3780 blocking, and block mode without blocking, see
the RECEIVE command in Section 3.