Another form of overriding a file is to change the file that is used by the program.
This can be useful for moved or renamed files after you compile the program.
For example, you want to send the output from your application program to
tape file TAPE20 instead of the tape file OUTPUT1 (The application program
specifies OUTPUT1). Before you run the program, enter the following code:
OVRTAPF FILE(OUTPUT1) TOFILE(TAPE20)
LABEL(FILE01) OPNSCOPE(*JOB)
You must create the file TAPE20
by a CRTTAPF command before you use it.
Figure 1 explains
this example.
Figure 1. Override a file name
You might want to override a file with a file that has a different
file type. For example, you might want to override a diskette
file with a display file. To determine if you can override your file with
a file that has a different type, see the information under File redirection.