Updating records
Updating a record
is also known as
rewriting a record
.
Before updating a record you must first read it, using readRecord method in 'update' mode. This locks the record so that nobody else can change it.
Use rewriteRecord method to update the record. Note that the IccFile object remembers which record is being processed and this information is not passed in again.
For an example, see code fragment: "Read record for update".
The base key in a KSDS file must not be altered when the record is modified. If the file definition allows variable-length records, the length of the record can be changed.
The length of records in an ESDS, RRDS, or fixed-length KSDS file must not be changed on update.
For a file defined to CICS® as containing fixed-length records, the length of record being updated must be the same as the original length. The length of an updated record must not be greater than the maximum defined to VSAM.