The file system uses record pointers to find specific records for your use.
Physical record pointers (also referred to as block pointers) are used to
locate specific blocks on disk; logical record pointers blocks and deblocks
the logical records in a physical record and indicate specific logical records
within a file. A file opened with the inhibit buffering option parameter set
to BUF (the default) is accessed with a logical record pointer. A file opened
with the inhibit buffering option parameter set to NOBUF is accessed with a
physical record (or block) pointer.
Figure 7-1 “Record Pointers ” shows how the physical and logical record pointers operate together
to locate any record in a file. For any record, the physical record pointer
indicates the correct block, and the logical record pointer locates the logical
record within the block.
The file system uses both the physical and the logical record pointers to
locate records. Future references to "record pointer" in this manual will
imply this combination.
When you open your file the HPFOPEN/FOPEN intrinsic sets the record pointer to
record 0 (the first record in your file) for all operations. If you have
opened the file with APPEND access, though (using the access type option
parameter available in HPFOPEN/FOPEN), MPE/iX moves the record pointer to the
end of the file prior to a write operation; this ensures that any data that you
write to the file is added to the end of the file rather than written over
existing data.
Following initialization, the record pointer may remain in position at the head
of your file, or it may be moved by the intrinsics used in record selection.