Column headings turn a spreadsheet-like dump into a readable report. Without them, readers guess whether column three is hours, dollars, or a code. In Easytrieve, headings usually start life on the field definition: DEFINE GROSS 94 4 P 2 HEADING 'GROSS PAY'. When LINE 01 lists GROSS, the report writer prints GROSS PAY above that column. TITLE still handles the page banner— company name and report title—while HEADING owns the per-column labels under that banner. Beginners mix the two words constantly. This page separates them, shows DEFINE HEADING patterns, explains default field-name labels, discusses spacing with REPORT SPACE and LINESIZE, covers MASK coexistence, notes LABELS report behavior, and gives editing rules so headings stay short enough to align with detail values.
| Layer | Answers | Example |
|---|---|---|
| TITLE | What is this page? | 'PAYROLL REGISTER' |
| HEADING | What is this column? | 'EMPLOYEE NAME' |
| LINE | What is the value? | NAME field contents |
Read a page top-down: TITLE orients the whole sheet, HEADING orients each column, LINE supplies data. Skipping HEADING forces people to memorize cryptic field names like EMP# or PPK. Skipping TITLE leaves a naked grid without context for which run or company produced it.
12345678910111213FILE PERSNL FB(150 1800) EMP# 9 5 N HEADING 'EMP NO' NAME 17 20 A HEADING 'EMPLOYEE NAME' DEPT 98 3 N HEADING 'DEPT' GROSS 94 4 P 2 HEADING 'GROSS PAY' + MASK ('$$,$$9.99') JOB INPUT PERSNL PRINT REPORT R1 LINESIZE 100 TITLE 01 'PERSONNEL LISTING' LINE 01 EMP# NAME DEPT GROSS
Each field carries a human label. LINE only lists field names; headings print automatically above the matching columns. MASK edits how GROSS looks without changing HEADING text. The plus continuation shows MASK on a following line in classic Easytrieve style—confirm continuation rules for your site's source format. Centralizing HEADING on DEFINE keeps five different reports consistent when they all LINE the same fields.
If you omit HEADING, Easytrieve commonly prints the field name itself as the column title—EMP#, NAME, GROSS. That is acceptable for technical dumps and terrible for business users who expect Employee Number. Prefer explicit HEADING for any report that leaves the programming team. Special characters in field names can look odd as headings; quoted HEADING text lets you use spaces and mixed case where the product and printer allow.
Column headings share the horizontal budget set by LINESIZE and REPORT SPACE. A twenty-character HEADING over a five-digit EMP# wastes width and can shove neighboring columns rightward. Aim for headings roughly as wide as the edited detail values. SHORT labels like DEPT, GROSS, HRS read cleanly. When a heading must be long, abbreviate (EMPLOYEE NAME → EMP NAME) or accept a wider LINESIZE. NOADJUST and COL positioning on LINE change how columns sit; headings follow the same column structure the detail uses.
123456789DEFINE WS-BONUS W 7 P 2 HEADING 'BONUS' MASK ('$$,$$9.99') JOB INPUT PERSNL WS-BONUS = GROSS * 0.10 PRINT REPORT R1 TITLE 01 'BONUS WORKSHEET' LINE 01 EMP# NAME GROSS WS-BONUS
Calculated W fields need HEADING just like file fields if they appear on LINE. Assign WS-BONUS before PRINT so the work record captures the value. Without HEADING, readers see WS-BONUS as the column title—fine for debug, poor for payroll distribution.
When CONTROL starts a new page (NEWPAGE options) or prints summary lines, column headings usually reappear at the top of the next page with TITLE. Summary lines may use different annotation than detail headings—totals often print under the same columns without repeating HEADING text on every break line. Design reports so subtotal rows remain aligned under GROSS and similar amount columns so heading meaning still applies.
Some REPORT options produce label-style output and suppress normal TITLE and HEADING bands so address blocks print without spreadsheet headers. When you switch a program to LABELS, do not expect your DEFINE HEADING text to show as column titles. Conversely, standard listing reports should not use label mode if you need classic headings.
All three can coexist on one DEFINE. Changing MASK does not rewrite HEADING. Changing HEADING does not change how many decimals MASK shows. Keep vocabulary straight in code reviews.
EBCDIC printers and PDF transforms may limit which characters appear in headings. Stick to plain letters, digits, and simple punctuation for portability. Extended reporting features may allow font numbers with heading text on advanced printers—site-dependent. Test a one-page sample on the real SYSOUT class before releasing a wide production report.
HEADING is the little word written on the sticker above each jar in the cupboard—Sugar, Flour, Rice—so you know what is inside. TITLE is the big sign on the cupboard door that says Kitchen Pantry. LINE is the food inside the jar. You need the big sign and the little stickers, and they are not the same thing.
1. HEADING on a DEFINE field provides:
2. TITLE differs from HEADING because TITLE is:
3. If LINE lists EMP# with no field HEADING:
4. REPORT LABELS style reports typically:
5. Long HEADING text that exceeds column width: