ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Printer file & Overflow

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Printer file & Overflow

    Hi All,

    I am new to printer files. Can anybody please explain how the overflow occurs while printing.

    I am aware of overflow indicator. by that we can print header every time when it is on.

    My question is how the system know the page's ending?

    should we explicitly mention the no of lines per page or system will automatically know when the page is ended and turn on the overflow indicator ?

    If we should mention the number of lines what is keyword?

    How can we set the number of lines for different paper sizes automatically?



    Thanks in advance.

  • #2
    Re: Printer file & Overflow

    some reading:


    Handling Page Overflow

    An important consideration when you use a PRINTER file is page overflow. For an externally-described PRINTER file, you are responsible for handling page overflow. Do one of the following:
    • Specify an indicator, *IN01 through *IN99, as the overflow indicator using the keyword OFLIND(overflow indicator) in the Keywords field of the file description specifications.
    • Check the printer device feedback section of the INFDS for line number and page overflow. Refer to the ILE RPG for AS/400 Reference for more information.
    • Count the number of output lines per page.
    • Check for a file exception/error by specifying an indicator in positions 73 and 74 of the calculation specifications that specify the output operation, or by specifying an INFSR that can handle the error. The INFDS has detailed information on the file exception/error. SeeHandling Exceptions for further information on exception and error handling.

    For either a program-described or an externally-described file, you can specify an indicator, *IN01 through *IN99, using the keyword OFLIND(overflow indicator) on the File Description specification. This indicator is set on when a line is printed on the overflow line, or the overflow line is reached or passed during a space or skip operation. Use the indicator to condition your response to the overflow condition. The indicator does not condition the RPG overflow logic as an overflow indicator (*INOA through *INOG, *INOV) does. You are responsible for setting the indicator off.
    For both program-described and externally-described files, the line number and page number are available in the printer feedback section of the INFDS for the file. To access this information specify the INFDS keyword on the file specification. On the specification, define the line number in positions 367-368 and define the page number in positions 369-372 of the data structure. Both the line number and the page number fields must be defined as binary with no decimal positions. Because the INFDS will be updated after every output operation to the printer file, these fields can be used to determine the current line and page number without having line-count logic in the program.
    Note:
    If you override a printer file to a different device, such as a disk, the printer feedback section of the INFDS will not be updated, and your line count logic will not be valid.
    For a program-described PRINTER file, the following sections on overflow indicators and fetch overflow logic apply.
    the rest: http://publib.boulder.ibm.com/infoce...0925076315.htm


    Always A great resource
    Over the years, iSeries Access virtual printer emulation sessions have been used to successfully print a variety of spool file reports from System i and AS/400 systems to a local PC printer. Regardless of the report’s page attributes (page orientation, lines per inch, characters per inch, number of columns, etc.), the printer emulator will often



    look at OVRFLW on chgprtf and compile..
    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment

    Working...
    X