Exchange/SNA Manual
RECEIVE Command
Exchange/SNA Commands
104700 Tandem Computers Incorporated 3–37
If you omit this parameter and the receive file is an existing file of any type
other than an unstructured disk file, the records are written to the receive file
as received with no added blanks or truncation, provided the records are less
than or equal to the record size of the receive file. Any records larger than the
record size of the receive file are truncated.
If you omit this parameter and the receive file is an existing unstructured disk
file, the records are written to the receive file in a special, fixed-length format.
This format is described below under “Considerations.”
If you omit this parameter and the receive file does not yet exist, an EDIT-
format file is created and the records are written to the file as received up to a
maximum length of 239 bytes. Any records longer than 239 bytes are
truncated.
Considerations The RECEIVE command receives records from the host and appends those records to
the specified file. Before you can use the RECEIVE command, you must have
established a connection between the Exchange/SNA command interpreter and an
Exchange/SNA line server using the CONNECT command. For information on
establishing a connection, see the CONNECT command earlier in this section.
Receive File Open Mode
The receive file is opened by Exchange/SNA for write-only, exclusive access, unless
the file is a terminal. If the file is a terminal, the file is opened for read/write, shared
access.
Record Format for Unstructured Disk Files
If the receive file is an unstructured disk file and you omitted the RECSIZE parameter,
the records are written as fixed-length records of 257 bytes (or 259 bytes if FORMS
OFF is not specified). The format of each record is described below.
Each record is padded with blanks as needed to make a 255-byte record (or 257-byte
record if FORMS OFF is not specified—two bytes are required for the vertical forms-
control escape sequences). Two additional bytes are then appended to the record,
making a total of 257 bytes per record (or 259 bytes per record if FORMS OFF is not
specified).
The first additional byte contains the number of the file received from the host that
contains that record. File numbers begin with 0 and are incremented by 1 for each file
received. The file numbers are reset to 0 with each new RECEIVE command. You can
use the first additional byte (byte 256 or 258 in each record) to separate multiple files
written to the same receive file.
The second additional byte contains the number of bytes in the record before any
blanks were added (the original record length). You can use the second additional
byte (byte 257 or 259 in each record) to determine the number of bytes of data in each
record.