12. Report-Writer Statements : Page Layout and Control Statements : .Pagelength Statement--Set Page Length : Description
 
Share this page                  
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.