19.1.2 Opening a Tape File for Output
To create and open a magnetic tape file for output, use the
OPEN statement. The following statement opens the file
PARTS.DAT and writes 256-byte records that are blocked
four to a physical tape block of 1024 bytes:
OPEN "MT1:PARTS.DAT" FOR OUTPUT AS FILE #2%, SEQUENTIAL FIXED, &
RECORDSIZE 256%, BLOCKSIZE 4%
Specifying FIXED record format creates ANSI F format
records. Specifying VARIABLE creates ANSI D format
records. If you do not specify a record format, the default is
VARIABLE.
If you do not specify a block size, BASIC defaults to one record
per block. For small records, this can be inefficient; the tape
will contain many interrecord gaps.