(Read-only) The LINESLEFT option contains the number of lines left on the current page. The LINESLEFT option is meaningful only when PAGING is set to
YES and only for output from commands such as REPORT and LISTNAMES.
LINESLEFT is used primarily in report programs to check the number of lines left on a particular page. When the number of lines left is less than that required for a part of the report that you do not want interrupted by a page break, you can then use a PAGE statement to skip to a new page.
When you change the value of PAGESIZE, the value of LINESLEFT is adjusted accordingly. First, LINESLEFT is subtracted from the old value of PAGESIZE, which gives the lines already used. This result is then subtracted from the new value of PAGESIZE which gives the new value of LINESLEFT. When LINESLEFT becomes less than 1 as a result, a new page is started at the next output line.
When you set PAGING to
NO, LINESLEFT is set to the value of PAGESIZE, and it keeps this value until PAGING is set to
YES. When you set PAGING to
YES, LINESLEFT begins counting the lines on the current page.
When you use an OUTFILE statement to direct output to a file, LINESLEFT is set to
66 for the file, to match the default value of PAGESIZE. When you set PAGESIZE to a new value for the current outfile, LINESLEFT will be adjusted accordingly. For example, assume that you direct output to a file and then set PAGESIZE to
40. In this case, Oracle OLAP will set LINESLEFT to
40 for the file. This ensures that the first line of output to the file will trigger a new page when PAGING is set to
When you use an OUTFILE statement with the EOF keyword to redirect output to the default outfile, LINESLEFT will contain the value that it last held for the default outfile.
When you produce output that contains the value of LINESLEFT, the lines that contain this value are never included in the value recorded for LINESLEFT.
In a report, you want a one-line footnote preceded by two blank lines at the bottom of a page. Use the following statements to generate the footnote when three lines remain on the page.
IF LINESLEFT EQ 3 THEN DO BLANK 2 ROW W 50 'Subject To Change Without Notice.' DOEND