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

Updating Existing Records

MPE documents

Complete PDF
Table of Contents
Index

E0300 Edition 4 ♥
E0394 Edition 3

To update a record in a KSAM file, the HPFOPEN or FOPEN intrinsic call to open the file must specify update access. This is set by the aoption parameter. Normally, you would read the record with one of the read intrinsics , to verify its contents before modification.

The FUPDATE intrinsic writes the contents of the buffer area over the contents of the last record accessed. This buffer area is identified in an FUPDATE intrinsic parameter. The written record must contain all the key values expected by the file. If only a portion of the record is updated, specified by the tcount parameter, this portion must contain all primary and alternate key values. If it does not, a CCL condition is returned and the update does not take place.




Writing New Records


Deleting a Record