Yes, philp you are right. I found that it prompt this error because of COMMIT is on.
Register Hereor login if you are already a member
Maybe it's just me but I have never seen a file with IF and the A. The file is designated as input with an ADD option? Should it not be UF ?
flg must have a true or false value before file is open. Obviously, based on the error message, it was true.