Compaq AAQ2G1FTK Marine Radio User Manual


 
Processing Files and Records
6.1 Dening Files and Records
Sequential files always contain an end-of-file (EOF) indication. On magnetic
tapes, it is the EOF mark; on disk, it is a counter in the file header that
designates the end of the file. Compaq COBOL statements can write over the
EOF mark and, thus, extend the length of the file. Because the EOF indicates
the end of useful data, Compaq COBOL provides no method for reading beyond it,
even though the amount of space reserved for the file exceeds the amount actually
used.
Occasionally a file with sequential organization, for example, a multiple-reel
magnetic tape file, is so large that it requires more than one volume. An end-of-
volume (EOV) label marks the end of recorded information on each volume and
signals the file system to switch to a new volume. On multiple-volume files, the
EOF mark appears only once, at the end of the last record on the last volume.
Figure 6–2 depicts a multiple-volume, sequential file.
Figure 62 A Multiple-Volume, Sequential File
ZK6056GE
Volume 1
...
REC REC REC REC REC REC EOV
Volume 2
...
REC REC REC REC REC REC EOV
Volume 3
...
REC REC REC REC REC REC EOF
When you select the medium for your sequential file, consider the following:
Speed of access—Tape is significantly slower than disk. In general, most
removable media storage (magnetic, optical, and so forth) devices are slower
than your fixed disks.
Frequency of use—Use removable media devices to store relatively static files,
and save your fixed disk space for more dynamic files.
Cost—Fixed disks are generally more expensive than removable media
devices. The more frequently you plan to access the data, the easier it is to
justify maintaining the data on your fixed disks. For example, data that is
accessed daily must be kept on readily available disks; quarterly or annual
data could be offloaded to removable media.
Transportability—Use removable media if you need to use the file across
systems that have no common disk devices (this technique is commonly
referred to as ‘‘sneakernetting’’).
See the OpenVMS I/O User’s Reference Manual or the
ltf(4)
manpage for more
information on magnetic tape formats.
64 Processing Files and Records