title: Under what circumstances will OVRDBF cause error message CPF5149 to be prompted?
body: <p>I am currently working on four of CL and RLG programs. The call stack is as follows: A->B->C->D where A is the top caller CL program and D is the bottom callee RPG program. Program A has an OVRDBF statement with SHARE(*YES) option on a file, which is used as output in program D. Now I am facing a problem, which is that whenever D tries to write a record into this file error message CPF5149 is thrown telling me that the I/O operation is not valid. If I comment this OVRDBF statement in program A then D can write the record into the file without any problem. So why exactly does this OVRDBF cause trouble with I/O in a RPG program? How to solve it? Removing it might not be an option. </p>