|Oracle® OLAP DML Reference
10g Release 1 (10.1)
Part Number B10339-02
The LINENUM option contains the current line number of the output. Its value is incremented automatically as output lines are produced. The LINENUM option is meaningful only when PAGING is set to
YES and only for output from commands such as REPORT and LISTNAMES.
LINENUM = n
An integer expression. Normally you do not want to set LINENUM explicitly, but just want to check its current value.
At the beginning of each new page, LINENUM is automatically reset to
When PAGING is set to
NO (its default), the value of the LINENUM option continues to increment as more output lines are produced. When you set PAGING to
YES, LINENUM is set to
1 and it begins counting lines on the current page.
When you use the OUTFILE command to direct output to a file, LINENUM is set to
1 for the file. When you use OUTFILE with the EOF keyword to redirect output to the default outfile, LINENUM will contain the value that it last held for the default outfile.
When you produce output that contains the value of LINENUM, and a new page is created by this output, the value of LINENUM will be recorded as
1 when your output consists of a single line. However, when the output is a multiline value, the value of LINENUM may be recorded as a value that is larger than PAGESIZE.
When the line number you are interested in obtaining is the current record number of a file that is opened for reading, see the RECNO function.
Example 16-22 Keeping the Heading Size Constant
Suppose you have a heading that varies between one and two lines from page to page. Regardless of this variation, you want to draw a line across the page at a constant position below the heading. Include the following statement in the page heading program that you use with your report program.
WHILE LINENUM LT 5 BLANK ROW W LSIZE ROW CENTER '--------------------------------'