Search code examples
ioibm-midrangecl

Suppressing File IO using CL As400 command


I have recently been tasked by my organization with modifying a large program on our AS400 system. Since I have not worked with this part of the system before before, I wanted to run it through the debugger to get a handle on how it works - however I have been advised that running this program could cause unwanted database changes even in a dev environment.

Therefor I was hoping to use a CL command that suppresses file IO that I came across in training. Unfortunately, I have forgotten the name of it, no longer have access to my training resources and have been unable to find anything online. Does my description correspond to any known commands (or are there any others I might find useful in this situation)?


Solution

  • the INHWRT parameter of the OVRDBF command is used, as the name implies, to inhibit writes, updates and deletes from being actually applied to the file. Beware that if trying to prevent updates of an entire application you have to apply the override to every file. And if the application writes to a table, then runs code that relies on that data being in the table, then that will not work either.

    In practice, I have never seen INHWRT used in anything but a single purpose program.