Every polished Easytrieve listing starts with a TITLE. The title band tells readers which company, which report, which period, and which page they are holding—before they study a single detail row. TITLE belongs in the REPORT declaration with LINE and CONTROL, not in the JOB loop. You can stack up to ninety-nine title lines, skip numbers for blank vertical gaps, mix literals with working-storage fields, and let Easytrieve stamp date and PAGE on line one automatically. This chapter page focuses on TITLE as report design: banner hierarchy, NODATE/NOPAGE, spacing and COL, centering versus NOADJUST, TITLESKIP, control-break titles, and mistakes that produce crowded or missing headers. Use it alongside the TITLE statement reference for syntax depth.
12345REPORT PAY-RPT LINESIZE 80 TITLE 01 'ACME CORP PAYROLL REGISTER' TITLE 02 'PERIOD ENDING' WS-PERIOD-END TITLE 04 'CONFIDENTIAL - INTERNAL USE' LINE 01 EMP# NAME DEPT GROSS
TITLE 01 is the main banner. TITLE 02 adds period context with a working-storage date field assigned before PRINT. TITLE 04 skips 03, leaving a blank title line for breathing room. LINE follows after titles in the declaration; HEADING labels still come from field attributes. Without any TITLE, you lose the automatic date/page framing that only applies when TITLE 01 exists.
| REPORT option | Effect on TITLE 01 |
|---|---|
| (default) | Date and PAGE n frame the title text |
| NODATE | Suppresses automatic date |
| NOPAGE | Suppresses automatic page count |
| SHORTDATE | Shorter date presentation when date prints |
| No TITLE at all | No automatic date/page injection |
Defaults save coding but surprise beginners who already put dates in TITLE literals—you may see two dates. Use NODATE when WS-PERIOD-END is the only date that matters. Keep page numbers unless the report is a single-page form where PAGE 1 looks silly.
Title-numbers run 01 through 99 in ascending order when multiple TITLE statements exist. A single TITLE may omit the number (defaults to 01). Skipping a number inserts a blank title line—handy instead of empty literals. Do not renumber randomly after production users memorize where the confidential line sits; treat title layout as a published interface.
123REPORT R1 LINESIZE 100 SPACE 3 TITLE 01 'WESTERN' +4 'REGION' +4 'SALES' TITLE 02 COL 1 'PREPARED BY' COL 60 WS-USERID
SPACE sets default gaps between title items. +offset and -offset tweak individual gaps. COL places the next item at an absolute column—useful for left label / right value title rows. Items must still fit within LINESIZE; oversized titles wrap or collide. Prefer splitting across TITLE 02 and TITLE 03 over cramming one overloaded TITLE 01.
By default title lines center within the title area defined by LINESIZE. That looks professional on classic listings. REPORT NOADJUST left-aligns the report including titles—better for grid-like or machine-compared output. SPREAD and NOADJUST combinations follow REPORT rules; do not assume every option stacks. After NOADJUST, re-check whether your mental picture of a centered company name still holds—often you switch to COL-based title layouts.
TITLESKIP n inserts blank lines after the last title before headings or detail. A skip of 1 or 2 prevents the banner from sitting on top of EMP NO / NAME labels. Large skips waste paper on hundred-page runs—choose readability over decoration. LABEL-style reports may suppress titles entirely; TITLESKIP then has nothing to separate.
1234567REPORT BY-DEPT LINESIZE 132 SEQUENCE DEPT EMP# CONTROL DEPT NEWPAGE TITLE 01 'DEPARTMENT PAY DETAIL' TITLE 02 'DEPARTMENT' DEPT LINE 01 EMP# NAME GROSS SUM GROSS
NEWPAGE on CONTROL starts a fresh page per department. TITLE 02 shows the current DEPT value so each page is self-describing even if torn from the stack. Assign nothing special in JOB beyond normal PRINT—the break supplies the field value at format time. This pattern beats stuffing department into every detail LINE when the page already announces it.
Run date, requested department, and user id often live in W fields set in START or before the loop. Reference them on TITLE so every page shows the selection criteria. Set those fields before any PRINT that feeds the report so the work file carries consistent title values. Changing a W field mid-job can produce mixed titles across pages if snapshots differ—set once when possible.
Putting column names only in TITLE forces readers to map positions manually. Putting report names only in HEADING wastes the banner. Use each layer for its job.
TITLE is the cover sticker on a notebook. It says whose notebook it is and what subject it is. Easytrieve can also stamp today's date and the page number on that sticker for you. HEADING is the little labels on each column inside the notebook. LINE is the writing on each row. You put the sticker on every page so if one page falls on the floor you still know where it belongs.
1. TITLE statements are coded:
2. Automatic date and page on TITLE 01 are suppressed by:
3. TITLE differs from HEADING because TITLE is:
4. Skipping TITLE 02 by coding TITLE 01 then TITLE 03:
5. COL on TITLE places the next item: