Overriding files

You can use override commands to have a program use a different file with the same format.

For example, assume that a program in the contracts and pricing application at the JKL Toy Company writes pricing information to a work file before making price changes. A user with access to a command line who wanted to capture confidential information can use an override command to cause the program to write data to a different file in a library controlled by the user.

You can make sure that a program processes the correct files by using override commands with SECURE(*YES) before the program runs, thus those files are protected from the effects of any file override commands that were previously called. If you use SECURE(*NO), those files are not protected from other file overrides. Their values can be overridden by the effects of any file override commands that were previously called.