Assuming that you are using native I/O .. F specs and reads and chains .. not SQL
and further assuming that you are not using commitment control
A record is locked when it is acquired, as in a chain or read, by a program that has opened the file for Update (not input). It remains locked until
- the program ends or the file is closed
- the record is updated or deleted
- another record is acquired by this program through the same access path.
- the record is unlocked
Access to a record that is locked will not be possible by another program or job that is attempting to acquire that record for update. A program/job can acquire a locked record when that program/jobs access path is for input.