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

Deleting a Record

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

The intrinsic FREMOVE effectively removes the current record from the KSAM file. When executed, the 4-byte record header is modified, identifying the record as deleted. All key entries pointing to this record are deleted from the indexes. Although the data still occupies record space in the file, it is no longer possible to access the record through standard read operations. Note that if deleted record space can be reused, this area can be overwritten by a new record.

The FREMOVE intrinsic checks only the logical record pointer, not the physical record pointer, to locate the record to be deleted. To delete a record located by its physical record pointer, precede the call to the FREMOVE intrinsic with the FPOINT intrinsic. The FPOINT intrinsic locates the record by its physical record pointer but sets both the logical and physical record pointers.


NOTE: If you use the FREADDIR or FREADC intrinsic to locate the record, only the physical record pointer is set. You may delete the wrong record because the logical record pointer was not set by the read procedure.




Updating Existing Records


Shared Access