HPlogo Using KSAM XL: 900 Series HP 3000 Computer Systems > Chapter 6 Writing and Updating Record Data

Deleting a Record

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

The intrinsic FREMOVE effectively removes the current record from the KSAM XL 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.
Feedback to webmaster