19. Advanced File Input and Output
This chapter describes the more advanced I/O features avail-
able in BASIC. For more information about I/O to RMS disk
files, see Chapter 14. The following topics are presented:
.
RMS I/O to ANSI magnetic tapes
.
Device-specific I/O to magnetic tapes (including TK50
devices), disks, and unit record devices
.
I/O to mailboxes
.
Network I/O
When you do not specify a file name in the OPEN state-
ment, the I/O you perform is said to be device-specific .
This means that read and write operations (GET and PUT
statements) are performed directly to or from the device. For
example:
OPEN "MTA2:" FOR OUTPUT AS FILE #1
OPEN "MTA1:PARTS.DAT" FOR INPUT AS FILE #2, SEQUENTIAL
Because the file specification in the first line does not contain
a file name, the OPEN statement opens the tape drive for
device-specific I/O. The second line opens an ANSI-format
tape file using RMS because a file name is part of the file
specification.
The following sections describe both I/O to ANSI-format
magnetic tapes and device-specific I/O to magnetic tape, unit
record, and disk devices.