IBM Support

Forcing Spooled Files to Print in Portrait by Changing a Printer File and/or Application

Troubleshooting


Problem

This document provides information on forcing operating system spooled files to print in portrait by changing a printer file or an application.

Resolving The Problem

This document provides information on forcing operating system spooled files to print in portrait by changing a printer file or an application.

This document was last updated on 1 May 2009.





Information about Page Rotation

Often, operating system printer files, whether they are system-supplied or created using the Create Printer File (or CRTPRTF) command, are set up with the following attributes:

 Printer device type  . . . . . . . . . :   *SCS
    Page size:
      Length . . . . . . . . . . . . . . . :   66
      Width  . . . . . . . . . . . . . . . :   132
      Measurement method . . . . . . . . . :   *ROWCOL
    Lines per inch . . . . . . . . . . . . :   6
    Characters per inch  . . . . . . . . . :   10
    Overflow line number . . . . . . . . . :   60
    Print quality  . . . . . . . . . . . . :   *STD
    Font:
      Identifier . . . . . . . . . . . . . :   *CPI
      Point size . . . . . . . . . . . . . :   *NONE
    Page rotation  . . . . . . . . . . . . :   *AUTO


This includes the printer files used for print screens (QSYSPRT), job logs (QPJOBLOG), Query/400 (QPQUPRFIL), and many others. When a printer file is set up with this combination of page size, page rotation, and print quality and is then used to create a spooled file, that spooled file prints in portrait on wide carriage line printers and dot matrix printers, prints in portrait and in a compressed font on narrow carriage line printers and dot matrix printers, and in landscape on laser printers and most ink jet printers.

In basic terms, the reasons for this are because a page size of 66 x 132 with 6 LPI and 10 CPI comes out to a paper size of 13.2 inches wide by 11 inches long, which will fit in portrait without compression on a wide carriage line printer or dot matrix printer, will not fit in portrait on a narrow carriage line printer or dot matrix printer without compressing the font to 16.7 or 17.1 CPI, and will not fit on a laser printers or ink jet printer without either printing in landscape or compressing the font (though what is usually done is to print both in landscape and in a compressed font).
    • - Using the Page Rotation (PAGRTT) Parameter in a Printer File to Request Portrait



      The Page Rotation (PAGRTT) parameter controls the rotation of text on the page. When *COR is specified for the PAGRTT parameter, the output is rotated 90 degrees, and the output may also be compressed to fit letter size (8.5" x 11.0") paper.

      When *AUTO or *DEVD is specified, the system determines the orientation of the printer page based on the paper size specified in the spooled file attributes. If the paper size is larger than letter size (8.5" x 11.0"), the output is rotated 90 degrees and the output may also be compressed to fit letter size (8.5" x 11.0") paper.

      One way to get the spooled file to print in portrait is to change the page rotation to 0 or 180.

      • - Using the Page Size (PAGESIZE) Parameter in a Printer File to Prevent Computer Output Reduction (COR) Processing



        The Page Size (PAGESIZE) parameter controls the physical size of the page. As mentioned above, the system rotates and compresses the output when *COR, *AUTO, or *DEVD are specified for the PAGRTT parameter and the page size specified in the spooled file attributes are larger than the size of the paper installed in the printer. If the spooled file specifies letter size paper, there is no reason for the system to rotate and compress the output.

        If the printer file is already set up to print at 6 LPI (lines per inch) and 10 CPI (characters per inch), you can indicate letter size paper by setting the page size at 66 lines by 85 characters. Because most laser printers and many line printers can print only 80 characters across on letter size paper (assuming portrait), the page size can also be set to 66 lines by 80 characters.

        The Page size (PAGESIZE) and Degree of page rotation (PAGRTT) parameters can be changed in the printer file using the Change Printer File (CHGPRTF) command. For example:

        CHGPRTF FILE(prtf-library/printer-file) PAGESIZE(66 85)
                LPI(6) CPI(10) PAGRTT(0)

        However, there are cases where it is better if the printer file is not be changed, for example, when using a system-supplied printer file or when the printer file is used for a number of different applications or reports. In those cases, the Override with Printer File (OVRPRTF) command can be used within a CL program. For example:

        OVRPRTF FILE(printer-file) PAGESIZE(66 85) LPI(6) CPI(10)
               PAGRTT(0) OVRSCOPE(*CALLLVL)


        In this example, the Override scope (OVRSCOPE) parameter is set to *CALLLVL to ensure that all spooled files opened at a call level that is the same as or higher than the current call level are influenced by the override. If this is not done, the override may not take effect. If using OVRSCOPE(*CALLLVL) does not work to specify the override at the proper call level, then try specifying OVRSCOPE(*JOB) instead to have the override take affect at all call levels within the job.

        • - Using the Characters Per Inch (CPI) Parameter in a Printer File to Print 132 Columns in a Compressed Font



          The Characters Per Inch (CPI) parameter controls the font size, or font pitch, defined in the number of characters per inch.

          The Characters Per Inch (CPI) and Page size (PAGESIZE) parameters can be set to allow 132-column reports to print in portrait, but in a compressed font, using the Change Printer File (CHGPRTF) command. For example:

          CHGPRTF FILE(prtf-library/printer-file) PAGESIZE(66 132)
                  LPI(6) CPI(16.7) PAGRTT(0)

          However, there are cases where it is better if the printer file is not be changed, for example, when using a system-supplied printer file or when the printer file is used for a number of different applications or reports. In those cases, the Override with Printer File (OVRPRTF) command can be used within a CL program. For example:

          OVRPRTF FILE(printer-file) PAGESIZE(66 132) LPI(6) CPI(16.7)
                 PAGRTT(0) OVRSCOPE(*CALLLVL)


          In this example, the Override scope (OVRSCOPE) parameter is set to *CALLLVL to ensure that all spooled files opened at a call level that is the same as or higher than the current call level are influenced by the override. If this is not done, the override may not take effect. If using OVRSCOPE(*CALLLVL) does not work to specify the override at the proper call level, then try specifying OVRSCOPE(*JOB) instead to have the override take affect at all call levels within the job.

        [{"Type":"MASTER","Line of Business":{"code":"LOB57","label":"Power"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"6.1.0"}]

        Historical Number

        12633649

        Document Information

        Modified date:
        18 December 2019

        UID

        nas8N1018309