ILE RPG Programmer's Guide


Using Overflow Indicators in Program-Described Files

An overflow indicator (OA through OG, OV) is set on when the last line on a page has been printed or passed. An overflow indicator can be used to specify the lines to be printed on the next page. Overflow indicators can be specified only for program-described PRINTER files and are used primarily to condition the printing of heading lines. An overflow indicator is specified using the keyword OFLIND on the file description specifications and can be used to condition operations in the calculation specifications (positions 9 through 11) and output specifications (positions 21 through 29). If an overflow indicator is not specified, the compiler assigns the first unused overflow indicator to the PRINTER file. Overflow indicators can also be specified as resulting indicators on the calculation specifications (positions 71 through 76).

The compiler sets on an overflow indicator only the first time an overflow condition occurs on a page. An overflow condition exists whenever one of the following occurs:

Table 50 shows the results of the presence or absence of an overflow indicator on the file description and output specifications.

The following considerations apply to overflow indicators used on the output specifications:

Table 50. Results of the Presence or Absence of an Overflow Indicator
File Description Specifications Positions 44-80 Output Specifications Positions 21-29 Action
No entry No entry First unused overflow indicator used to condition skip to next page at overflow.
No entry Entry Error at compile time; overflow indicator dropped from output specifications. First unused overflow indicator used to condition skip to next page at overflow.
OFLIND (indicator) No entry Continuous printing; no overflow recognized.
OFLIND (indicator) Entry Processes normal overflow.

[ Top of Page | Previous Page | Next Page | Contents | Index ]