Cobol isn’t my bag but the problem is common.
In RPG a Read no lock will encounter an error when another job has the record locked —
— not cool but that’s the way it works.
Start your program from job a. While it’s on the screen use another session with WRKUSRJOB
1. DSPJOB .. check locks – it may be locking a data area or other objects with excluse rights
2. DSPRCDLCK for the file in queston
– you may have a Read – No Lock but you maybe using another read
– you may have a level of commitment control on the file which locks all records used.
If you don’t discover something helpful start the second job
From a third session look at the
– job log of the second session .. what went wrong
– at the files – how many reads from the file occurred – how many writes to the screen, etc.