To update a record in a VSAM file, you must perform the following operations:
Once the record you want to update has been read in, you must ensure that no reading, writing, or repositioning operations are performed before fupdate().
If an fupdate() fails, you must reposition using flocate() before trying to read or write.
You can change the length of the record being updated. If your request does not exceed the maximum record size of the file, fupdate() writes a record of the length requested and returns the request. If your request exceeds the maximum record size of the file, fupdate() writes a record that is the maximum record size, sets errno, and returns the maximum record size.
You cannot change the prime key field of the record, and in KSDS AIX, you cannot change the key of reference of the record.
You cannot change the length of the record being updated. If the size of the record being updated is less than the current record size, fupdate() updates the amount you specify and does not alter the data remaining in the record. If your request exceeds the length of the record that was read, fupdate() writes a record that is the length of the record that was read, sets errno, and returns the length of the record that was read.
You cannot change the length of the record being updated or the key of reference of the record. If the size of the record being updated is less than the current record size, fupdate() updates the amount you specify and does not alter the data remaining in the record. If your request exceeds the length of the record that was read, fupdate() writes a record that is the length of the record that was read, sets errno, and returns the length of the record that was read.
RRDS files have fixed record length. If you update the record with less than the record size, only those characters specified are updated, and the remaining data is not altered. If your request exceeds the record size of the file, fupdate() writes a record that is the record size, sets errno, and returns the length of the record that was read.