READ for UPDATE in CICS

583 Views Asked by At

If I use READ for UPDATE in reading a record from a file without a subsequent DELETE, REWRITE, UNLOCK, or SYNCPOINT command. Will something happen to the record being read?

1

There are 1 best solutions below

0
Leigh Compton On

Nothing happens to the record itself. A lock will be held on the record (and maybe on the control interval) until the DELETE, REWRITE, UNLOCK, or SYNCPOINT is issued. See https://www.ibm.com/docs/en/cics-ts/5.6?topic=summary-read for the various locks that will be held based on the type of file and the access mode. NOTE that a SYNCPOINT will be issued automatically at end of task. While it's a poor programming practice to fail to issue a command that will release the lock, CICS will take care of things at end of task.