Overriding file attributes is the simplest form of overriding a file.
CRTPRTF FILE(QGPL/OUTPUT) SPOOL(*YES) + PAGESIZE(60 80) LPI(6) COPIES(2) + FILESEP(2) OVRFLW(55)
You specify the printer file OUTPUT in your application program with an overflow line number of 58 and a page size of 66 by 132.
OVRPRTF FILE(OUTPUT) COPIES(3) OVRFLW(60)Then you call the application program, and three copies of the output print.
When the application program opens the OUTPUT file, the server merges the file-specified attributes, program-specified attributes, and override-specified attributes to form the open data path. The server uses the open data path when the program runs. The server merges file-specified overrides with the program-specified attributes first. Then it merges these merged attributes with the override attributes. In this example, when the OUTPUT file is opened and output operations are performed, spooled output will be produced with a page size of 66 by 132, six lines per inch, three copies, two file separator pages, and overflow at 60 lines.
Figure 1 explains this example.