A report without titles looks like raw column data spilled on green-bar paper. The TITLE statement tells Easytrieve what to print at the top of every page before column headings and detail lines. You can place company name, report purpose, run parameters, and control-field values in up to ninety-nine title lines. TITLE is a report definition statement—it must follow REPORT in the report declaration block, alongside SEQUENCE, CONTROL, SUM, HEADING, and LINE. Beginners often confuse TITLE with HEADING: TITLE is page-level banner text centered within LINESIZE; HEADING labels each detail column. This page explains TITLE syntax, automatic date and page insertion on line one, spacing with SPACE plus and minus offsets, absolute positioning with COL, interaction with REPORT NOADJUST and TITLESKIP, control-break titles, and mistakes that produce crowded or misaligned headers on production reports.
1234REPORT PAY-RPT LINESIZE 80 TITLE 01 'PERSONNEL REPORT EXAMPLE-1' TITLE 03 'RUN DATE' WS-RUN-DATE LINE 01 DEPT EMPNAME GROSS
REPORT names the report and sets LINESIZE—the printable width used to center title lines. TITLE 01 introduces the first title line. When only one TITLE exists, the number defaults to 01 and may be omitted. TITLE 03 skips line 02, which prints blank vertical space. Each TITLE must include at least one title item: a quoted literal or a field name. Multiple items on one TITLE appear left-to-right with spacing controlled by REPORT SPACE and optional offsets.
| Area | Defined by | Typical content |
|---|---|---|
| Title area | TITLE 01–99 | Company name, report name, dates |
| Heading row | HEADING or LINE defaults | Column labels DEPT, GROSS |
| Detail lines | LINE | One row per input record |
| Total lines | CONTROL report | Subtotals and FINAL totals |
Unless suppressed, Easytrieve prints the system date at one end of TITLE 01 and PAGE n at the other, framing your literal title text in the center. A line might render as 01/31/26 PERSONNEL REPORT EXAMPLE-1 PAGE 1. Use REPORT NODATE to remove the date, REPORT NOPAGE to remove page count, or REPORT SHORTDATE for a shorter date format. If you code no TITLE statements at all, date and page are not printed—those defaults apply only when TITLE 01 exists.
REPORT SPACE sets default blank characters between consecutive title items—often three. +2 adds two more spaces beyond SPACE between the prior item and the next. -2 tightens spacing by two. Absolute space can range down to zero if the combined items still fit within LINESIZE. Crowded titles that wrap unexpectedly usually mean too many items or insufficient LINESIZE—widen LINESIZE on REPORT or split content across TITLE 02 and TITLE 03 instead of one overloaded line.
123REPORT RPT1 LINESIZE 60 SPACE 3 TITLE 01 'WESTERN' +5 'REGION' +5 'SALES' TITLE 03 'PERIOD ENDING' WS-PD-END
COL column-number places the next title item at a specific print column, overriding automatic spacing from the prior item. Use COL when aligning titles with detail columns below or when building a deliberate left-right layout. COL 40 'CONFIDENTIAL' right-justifies a label on an eighty-column LINESIZE report. Combine COL with literals and fields: TITLE 02 COL 10 DEPT COL 50 'DETAIL LIST' prints department code at column ten and fixed text at fifty.
By default each title line is centered within the title area defined by LINESIZE. REPORT NOADJUST left-justifies the entire report body including titles—useful for wide machine-readable layouts. SPREAD and NOADJUST are mutually exclusive on REPORT. Beginners who enable NOADJUST for detail alignment sometimes forget titles also shift left—verify sample output before promoting to production JCL.
12345678FILE PERSNL FB(150) DEPT W 3 N VALUE '903' JOB INPUT PERSNL NAME MYPROG PRINT REPORT1 REPORT REPORT1 LINESIZE 50 TITLE 01 'TEMPORARY EMPLOYEES' TITLE 03 'IN DEPARTMENT' DEPT LINE 01 ' '
Broadcom's introductory example prints TITLE 01 centered with automatic date and page, leaves TITLE 02 blank, then prints IN DEPARTMENT and the current DEPT value on TITLE 03. Field DEPT on TITLE shows live data—here constant 903 from VALUE on the FILE definition for illustration. In production the DEPT field might come from CONTROL NEWPAGE so each department section shows its code in the title when a new page begins.
CONTROL fields may appear on TITLE lines. Pair CONTROL field-name NEWPAGE so when the control value changes, the report starts a new page and the title can display the new break value. TITLE 03 'DIVISION' DIV-CODE COL 30 DIV-NAME is a readable pattern for hierarchical reports. Remember SEQUENCE must order input by control fields major-to-minor or breaks fire at wrong record boundaries and titles show stale values.
REPORT TITLESKIP n inserts n blank lines between the last title line and the first HEADING or LINE 01 row. Use TITLESKIP when titles feel cramped against column headings. TITLE does not replace HEADING—detail column labels still need HEADING values on fields or explicit HEADING statements. LABEL reports with REPORT LABELS suppress TITLE and HEADING automatically.
TITLE formats paginated report headers managed by the report writer. DISPLAY writes to SYSPRINT or a PRINTER file outside report pagination. Batch audit trails use DISPLAY; formatted manager reports use TITLE. Mixing DISPLAY debug lines into report activities does not affect TITLE layout on PRINT output.
TITLE is the big sign at the top of each page of your homework stack. Line one might say your school name and what the report is about, and the computer automatically adds today's date and page number on the sides. Line three might say which class the page is for. You can skip line two to leave empty space. COL is like saying start this word exactly at column forty instead of squishing words together with normal spaces.
1. TITLE statements belong in which program section?
2. How many TITLE lines can a report define?
3. TITLE 01 normally includes date and page number unless:
4. The COL parameter on TITLE:
5. Multiple TITLE statements must be numbered: