Multiuser operation

When updating or deleting a record it must first be locked to prevent other programs altering the record at the same time. This is done with KISAMReadHoldKey or KISAMReadHoldNext calls for either random access or sequential access. A program attempting to lock a record held elsewhere will get an error KE_LOCKED (12).

If locked successfully the row buffer can be updated and the record written back with a KISAMRewrite which will unlock the row.

If the row is to be deleted then a KISAMDelete will do that and free the lock.