This form of overriding files is a combination of overriding file attributes and overriding file names. With this form of override, you can override the file that is to be used in a program and you can also override the attributes of the overriding file.
CRTPRTF FILE(REPORTS) SPOOL(*YES) + PAGESIZE(68 132) LPI(8) OVRFLW(60) + COPIES(2) FILESEP(1)
OVRPRTF FILE(OUTPUT) TOFILE(REPORTS) COPIES(3)
Then call the application program, and the program produces three copies of the output using the printer file REPORTS.
Note that this is not equal to the following two override commands:
Override 1 OVRPRTF FILE(OUTPUT) TOFILE(REPORTS)
Override 2 OVRPRTF FILE(REPORTS) COPIES(3)
Only one override is applied for each call level for an open of a particular file; therefore, if you want to override the file that the program uses and also override the attributes of the overriding file from one call level, you must use a single command. If you use two overrides, the first override uses the printer file REPORTS to print the output. The server ignores the second override.