- HEADING – Creates a report heading
.SET HEADING 'heading specifier'
- RTITLE (report title) – Creates a report heading
.SET RTITLE 'heading specifier'The two commands are variations of the same command. The RTITLE command is easier to use because it automatically includes the report date and page numbers.
- FOOTING – Creates a page footer
.SET FOOTING 'footing specifier'
The specifier has the following format for both headers and footers:
- a is the left-justified entry on line 1.
- b is the centered entry on line 1.
- c is the right-justified entry on line 1.
- d is the left-justified entry on line 2.
- e is the centered entry on line 2.
- f is the right-justified entry on line 2.
- g is the left-justified entry on line 3.
- h is the centered entry on line 3.
- i is the right-justified entry on line 3.
- || separates the three parts of a line.
- // separates the lines.
To break a header line and begin a new line of header text, insert a pair of slashes (//) at the required break point. Up to nine break points can be entered for a maximum of 10 header lines within a HEADING or FOOTING command.
Specify only the entries needed, with the appropriate separator characters. If the left-middle-right entries are not specified, BTEQ centers the text. If the first-second-third lines are not specified, BTEQ puts the text on the first line.
If more than two pair of line separator characters are specified, indicating more than three lines, the following occurs:
|Mainframe-attached system||BTEQ returns an error message and treats the additional separators as header or footer text.|
|Workstation-attached system||BTEQ truncates the additional separators from the header or footer text.|
Example - Headers and Footers
In a mainframe-attached system, using the following FOOTING command and SELECT statement:
.footing '&DATE||Confid||dential||Page&PAGE select * from department;
The above example produces the following error message and report:
.footing '&DATE||Confid||dential||Page&PAGE *** Warning: Maximum of 2 '||' separators is allowed, others ignored. *** Query completed. 5 rows found. 4 columns returned. 90/08/10 select * from department; Page 1 DeptNo DeptName Loc MgrNo ------ -------------- --- ----- 500 Engineering ATL 10012 700 Marketing NYC 10021 300 Exec Office NYC 10018 600 Manufacturing CHI 10007 100 Administration NYC 10011
Refer to HEADING and RTITLE and FOOTING for additional information and examples of specifying report headers and footers.