.Pagelength Statement--Set Page Length
The .pagelength statement sets a new default page length in number of lines per page.
This statement has the following format:
.pagelength | .pl {nlines | expression}
The parameters for the .pagelength statement are as follows:
nlines
The number of lines per page. The default is 61 lines per page if the report is written to a file, or the length of your screen if the report is written to the screen. To suppress all pagination (eliminate all page breaks), specify .pagelength as zero (0).
expression
A numeric expression that evaluates to the new page length of the report. Precede all variables that are part of the expression with a dollar sign ($).
Description
The .pagelength statement controls where page breaks occur. The report formatter subtracts the number of lines in the footer (specified in the .footer page section of the specifications) from the total page length of nlines. Page length is the total number of body text lines for the page.
During the running of the report, Report-Writer checks to see if the total count of body text lines has been written to the current page. If not, no action is taken. If so, Report-Writer writes a page footer and header, and the report continues. If the .formfeeds statement or formfeed default is in effect, Report-Writer performs a formfeed at the end of each page footer.
The value used in the .pagelength statement should be greater than the combined number of lines specified in the heading and footing for the page.
You can override the .pagelength statement at runtime by specifying the ‑vpagelength flag on the report command line. If both the ‑v flag and the .pagelength statement are present, the ‑v flag overrides the .pagelength value.
Report-Writer evaluates any expression used as a parameter to the .pagelength statement during runtime.
Examples
1. Set a new page length for screens with 24 lines.
.pl 24
2. Set the page length to be the value of variable page_size.
.pl $page_size
3. Suppress report pagination.
.pl 0
Last modified date: 04/03/2024