It seems like I ran into this once. However, my issue was that a copy of the file being updated was sitting in another libarary other than the one I was looking at.
If it is only “debug” that makes the difference, then the program is coded to work differently under debug. I’d say that’s pretty unlikely. But we don’t know what you think works differently.
Are there different values in variables? Is a different path taken in code? Does an I/O statement work differently?
The only time I’ve ever seen debug make a difference <i>when everything else was equal</i> was a case where an I/O statement only properly populated variables in debug and not in normal mode. It turned out that the input was coded to run without any wait. It would always have time to complete when the program ran in single-cycle mode under debug.
That could be something like your case, but I’d expect that to be very unlikely.
Far more likely is the suggestion that it fails in batch but runs correctly interactive, or some similar difference in how the program is called. The suggestion that the parm list is the culprit is a good possibility there.
Describe the circumstances under which it succeeds and those under which it fails. Something other than debug is where the problem is likely to be found.