Easytrieve TITLE Statement

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.

Progress0 of 0 lessons

Statement Format

text
1
2
3
4
REPORT 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.

Title Area on the Page

Report page layout (top to bottom)
AreaDefined byTypical content
Title areaTITLE 01–99Company name, report name, dates
Heading rowHEADING or LINE defaultsColumn labels DEPT, GROSS
Detail linesLINEOne row per input record
Total linesCONTROL reportSubtotals and FINAL totals

Automatic Date and Page on TITLE 01

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.

Spacing: SPACE, +offset, and -offset

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.

text
1
2
3
REPORT RPT1 LINESIZE 60 SPACE 3 TITLE 01 'WESTERN' +5 'REGION' +5 'SALES' TITLE 03 'PERIOD ENDING' WS-PD-END

COL — Absolute Column Positioning

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.

Centering and NOADJUST

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.

Multiple TITLE Lines Example

text
1
2
3
4
5
6
7
8
FILE 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.

TITLE With Control Breaks

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.

TITLESKIP and HEADING Interaction

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 Versus DISPLAY

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.

Common TITLE Mistakes

  • Coding TITLE before REPORT or outside the report declaration block.
  • Numbering TITLE lines out of ascending order when multiple TITLE statements exist.
  • Forgetting at least one literal or field item on each TITLE line.
  • Expecting TITLE to define column headings—use HEADING instead.
  • Items wider than LINESIZE causing truncation or wrap errors.
  • Surprise date/page on TITLE 01 when NODATE or NOPAGE was intended.

Explain It Like I'm Five

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.

Exercises

  1. Write three TITLE lines with a deliberate gap at TITLE 02.
  2. Add REPORT NODATE and observe how TITLE 01 output changes in test.
  3. Position a literal at COL 5 and a field at COL 45 on the same TITLE.
  4. Explain the difference between TITLE and HEADING to a new teammate.
  5. Design titles for a CONTROL DEPT report with NEWPAGE per department.

Quiz

Test Your Knowledge

1. TITLE statements belong in which program section?

  • Report declaration after REPORT
  • Library FILE only
  • JCL only
  • SCREEN KEY definitions

2. How many TITLE lines can a report define?

  • Up to 99 numbered lines
  • Exactly one line
  • Unlimited
  • Only even numbers

3. TITLE 01 normally includes date and page number unless:

  • REPORT specifies NODATE or NOPAGE
  • LINE 01 is omitted
  • STOP is coded
  • FILE is INDEXED

4. The COL parameter on TITLE:

  • Places the next title item at a specific print column
  • Defines file column layout
  • Sorts the report
  • Closes the file

5. Multiple TITLE statements must be numbered:

  • In ascending sequence when more than one TITLE exists
  • Randomly
  • Descending only
  • With hexadecimal IDs
Published
Read time15 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve Report Generator 11.6 TITLE Statement (Reports)Sources: Broadcom Easytrieve 11.6 TITLE Statement, Activity Section ReportingApplies to: Easytrieve TITLE report headings