When records are written to a file for the first time, they
are usually written sequentially. Following execution of an FWRITE intrinsic, the logical record pointer is positioned
at the next sequential record in key sequence or at the end-of-file
marker if the record is the last in sequence.
Updating and deleting records also rely on pointer positioning.
The logical and physical record pointers are usually positioned
by a read procedure, as discussed in Chapter 5 “Reading File Data”.
Typically, a read procedure precedes an update or delete procedure
to verify that the correct record has been found. Table 6-1 “Pointer and Advance Flag Settings for Writing” specifies the advance flag and pointer usage of each
of the writing, updating, and deletion intrinsics.
Table 6-1 Pointer and Advance Flag Settings for Writing
| Intrinsic | Reads Advance Flag | Sets Pointer | Sets Advance Flag | Pointer Dependant |
|---|
| FREMOVE | no | both | no | yes |
| FUPDATE (keys unchanged) | no | none | yes | yes |
| FUPDATE(keys changed) | no | both | no | yes |
| FWRITE | no | both | no | yes |