X25AM Programming Manual

X3PAD Interface
X25AM Programming Manual527201-001
4-15
RECEIVE Command
RECEIVE Command
The RECEIVE command causes X3PAD to begin copying data transmitted from a
remote device into a file.
file
is the file to which data from the remote device is copied. X3PAD creates the file if
it doesn’t exist. STOP terminates writing data to the current RECEIVE file.
If an unrecoverable error occurs while writing to the RECEIVE file, it is closed and a
message is written to the OUT file.
If the RECEIVE file is an EDIT file, it is possible to write control characters to it that are
unacceptable to EDIT.
If the data received from the remote device was sent by an X3PAD program using the
SEND command, the record structure of the original file can be lost.
Table 4-13 summarizes potential RECEIVE error messages.
ERROR: I CANNOT OPEN file (ERROR nnn).
THERE IS NO CURRENT RECEIVE FILE.
If the RECEIVE file exists but cannot be opened, both messages are written to the
OUT file.
I HAVE CREATED A FILE NAMED file.
If the RECEIVE file does not exist, an EDIT file is created and a message is written
to the OUT file.
I HAVE CLOSED THE RECEIVE FILE.
If a RECEIVE file already exists (and is open), it is closed and a message is written
to the OUT file. The new file is created and data is written to it. If file already
exists and contains data, new data is appended to the end of the file.
RECEIVE [ TO file ]
[ STOP ]
Table 4-13. RECEIVE Command Messages Issued by X3PAD
I CANNOT OPEN file.
I HAVE CLOSED THE RECEIVE FILE file.
I HAVE CREATED A FILE NAMED file.
THERE IS NO CURRENT RECEIVE FILE.