HPlogo Using KSAM XL and KSAM 64 > Chapter 6 Writing and Updating Record Data

Chapter 6 Writing and Updating Record Data

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

Table of Contents
Writing New Records
Updating Existing Records
Deleting a Record
Shared Access
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
FREMOVEnobothnoyes
FUPDATE (keys unchanged)nononeyesyes
FUPDATE(keys changed)nobothnoyes
FWRITEnobothnoyes




Shared File Access


Writing New Records