Record locking

 

When a job holds a record lock and another job attempts to retrieve that record for update, the requesting job waits and is removed from active processing.

The requesting job will be active till one of the following events occurs:

More than one job can request a record to be locked by another job. When the record lock is released, the first job to request the record receives that record. When waiting for a locked record, specify the wait time in the WAITRCD parameter on the following create, change, or override commands:

When you specify wait time, consider the following information:

Programs keep record locks over long durations for one of the following reasons:

Another function that can put a lock on a file is the save-while-active function.

 

Parent topic:

How commitment control works with objects

 

Related concepts


JDBC Distributed transactions
Saving your system while it is active

 

Related reference


Related information for commitment control