To update a record in a KSAM XL 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.