CL Command Reference - OVRPRTF
CL Command List > OVRPRTF Reference
Description:
The Override with Printer File (OVRPRTF) command is used to (1) override (replace) the file named in the program, (2) override certain parameters of a file that are used by the program, or (3) override the file named in the program and override certain parameters of the file processed. Parameters overridden by this command are specified in the file description, in the program, or in other file override commands that run in the following command.
If a file named in the program is overridden, the name of that file is specified in the FILE parameter and the name of the overriding file (the file processed) is specified in the TOFILE parameter. The OVRPRTF command also specifies parameters to override values contained in the file description of the overriding file. If the file named in the program is not replaced but certain parameters of the file are overridden, the name of the file is specified in the FILE parameter and *FILE is specified in the TOFILE parameter. The parameters overridden are then specified by the other parameters of the OVRPRTF command. Parameters not specified do not affect parameters specified in the file description, in the program, or in other file override commands run later.
Restrictions:
. In a multithreaded job, this command may only be issued from the initial thread.
. In a multithreaded job, only Activation Group or Job scoped overrides will affect opens performed in a secondary thread.
Note: Using this command does not cause a file to be overridden immediately. Information provided on this command is stored until the file is used, at which time the file is overridden.
Examples:
Example 1: Printing Output
OVRPRTF FILE(PRINTOUT) TOFILE(PRINT3) SPOOL(*YES)
COPIES(5) OUTQ(OUTPUT1)
This command overrides the file named PRINTOUT and uses the printer file named PRINT3 to produce the spooled output on the printer. The output from the program is sent to the OUTPUT1 output queue. Five copies of the spooled file are printed on the printer specified on the Start Printer Writer (STRPRTWTR) command.
Example 2: Rotating Double-Byte Characters
OVRPRTF FILE(IGCLIB/IGCPRT) IGCDTA(*YES) IGCCHRRTT(*YES)
This command overrides the IGCPRT printer file, which is stored in the IGCLIB library. The override puts the IGCALTTYP DDS keyword into effect to change character output fields to DBCS fields, and rotates the double-byte characters when printing.