Purpose
Specifies the maximum number of lines on a printed page of output.
Syntax
where:
Syntax Element |
Specification |
n |
Specifies the maximum number of lines on a page. The value is 55 by default. The valid range is 1 to 2147483647 (for Workstation). The valid range is 1 to 2147483407 (for Mainframe). |
Usage Notes
Use the PAGELENGTH command to customize page length for different reports or forms.
Use an asterisk (*) to represent a single page with unlimited number of lines. Each query will produce one page with a length equal to the number of lines needed to print that query's entire result set and possibly a header, footer, column titles, and titledashes.
Note: The FORMAT setting must be ON for the PAGELENGTH setting to have any effect on formatting report form output.
The PAGELENGTH command can be used in a Teradata SQL macro.
Example
The following example shows the results of using the PAGELENGTH command to set the maximum page length at 67 lines and at 30 lines for the same select operation:
database workforce;
.set defaults
.set format on
.heading "Pagelength 67"
.footing "Bottom of Page”
.set pagelength 67
select deptname
,deptno
,loc from department
order by deptname
;
.defaults
.format on
.heading "Pagelength 30"
.footing "Bottom of Page”
.pagelength 30
= 1
.format off
.logoff
.exit
BTEQ Response
In response to the first select operation BTEQ formats the results, prints the footer at line 67, and ejects the page:
*** Query completed. 5 rows found. 3 columns returned.
Pagelength 67
DeptName DeptNo Loc
-------------- ------ ---
Administration 100 NYC
Engineering 500 ATL
Exec Office 300 NYC
Manufacturing 600 CHI
Marketing 700 NYC
.
.
(BTEQ counts to line 67)
.
.
Bottom of Page
In response to the second select operation BTEQ formats the results, prints the footer at line 30, and ejects the page as follows:
*** Query completed. 5 rows found. 3 columns returned.
Pagelength 30
DeptName DeptNo Loc
-------------- ------ ---
Administration 100 NYC
Engineering 500 ATL
Exec Office 300 NYC
Manufacturing 600 CHI
Marketing 700 NYC
.
.
(BTEQ counts to line 30)
.
.
Bottom of Page
Example 2
The Example 1 PAGELENGTH commands in a Teradata SQL macro appears as:
ECHO '.PAGELENGTH 67';
or as:
ECHO '.PAGELENGTH 30';