The following is a summary of differences when the database locking strategy is in place (as opposed to the default table
record locking strategy):
- A COBOL READ of a record that is locked by another run unit should return the record data and the 9/68 (LOCKED) condition.
However, the RDBMS may not actually lock the record until it has been modified, resulting in data being returned and the file
status set to 0/0 (SUCCESS). The actual behaviour is dependent upon the RDBMS being used
- A COBOL READ using the
WITH WAIT clause may not wait if the record has been locked by a different run unit, but that run unit has not yet modified the record.
This is for the same reason as above.
- The COBOL UNLOCK statement will not release a file's record locks until a syncpoint.
- The RDBMS may decide to acquire a lock against an entire page or table, in which case records may appear as locked even though
they were not explicitly locked by the user application.