When an rpg program reads/or chains a file with update it will lock the record until
- the read/chain has (n)
- an update is issued
- an unlock is issued
- another read/chain is made by the file on the same access path
- the file is closed
- the program/job ends
However, these rules changed considerably with commitment control — is that in use?
If SQL is in use select for update can put on broader locks in conjunction with the commitment sql commit level.
It’s possible to capture the details of record locks — while they are in effect — file – record # – locking process/program/user.
Hope others have better advise.
Do your maintenance programs share the access paths with your utility programs? I’m not certain how that affects the setting of *inlr in the parent program.