Easytrieve Report HEADING

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.

Progress0 of 0 lessons

TITLE Versus HEADING Versus LINE

Three layers of report text
LayerAnswersExample
TITLEWhat is this page?'PAYROLL REGISTER'
HEADINGWhat is this column?'EMPLOYEE NAME'
LINEWhat 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.

DEFINE HEADING Attribute

text
1
2
3
4
5
6
7
8
9
10
11
12
13
FILE 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.

Default Headings From Field Names

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.

Width, SPACE, and Alignment

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.

Working-Storage Fields on LINE

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

Headings After Control Breaks

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.

LABELS and Special Report Styles

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.

HEADING Versus Mask Versus VALUE

  • HEADING — label text above the column.
  • MASK — edit pattern for numeric or date display of the value.
  • VALUE — initial or constant content of the field, not the label.

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.

International and Printer Considerations

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.

Common HEADING Mistakes

  • Putting column labels only in TITLE and leaving columns unlabeled.
  • HEADING longer than LINESIZE can support across all columns.
  • Cryptic field-name defaults left for business users.
  • Forgetting HEADING on W fields used on LINE.
  • Assuming TITLE text replaces HEADING.
  • Inconsistent headings across reports for the same field.

Testing Headings

  1. Print one page; verify every LINE field has a sensible label.
  2. Compare heading width to masked detail width for amounts.
  3. Change one DEFINE HEADING; confirm all reports using that field update.
  4. Run with NODATE/NOPAGE titles still present—headings should remain.
  5. Check second page after page break—headings should repeat with titles.

Explain It Like I'm Five

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.

Exercises

  1. Add HEADING text to four FILE fields and LINE them on a report.
  2. Rewrite cryptic defaults EMP# and PPK into business labels.
  3. Create a W field with HEADING and MASK; PRINT it beside GROSS.
  4. Explain TITLE versus HEADING to a teammate in two sentences.
  5. Measure whether your headings fit in LINESIZE 80 for five columns.

Quiz

Test Your Knowledge

1. HEADING on a DEFINE field provides:

  • Default column title when the field appears on LINE
  • VSAM password text
  • JCL DD name
  • SCREEN cursor only

2. TITLE differs from HEADING because TITLE is:

  • Page banner text, not per-column labels
  • Always numeric
  • Only for SQL
  • Identical to LINE

3. If LINE lists EMP# with no field HEADING:

  • Easytrieve often uses the field name as the column label
  • The column never prints
  • JOB ABENDs always
  • TITLE is deleted

4. REPORT LABELS style reports typically:

  • Suppress normal TITLE and HEADING for label layouts
  • Require SQL UPDATE
  • Disable PRINT
  • Ignore LINE

5. Long HEADING text that exceeds column width:

  • May wrap or crowd adjacent headings—shorten or split lines
  • Always expands LINESIZE automatically
  • Converts to HEX
  • Deletes MASK
Published
Read time16 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve Report Generator 11.6 field HEADING and report column labelsSources: Broadcom Easytrieve 11.6 Language Reference DEFINE HEADING, REPORT, LINEApplies to: Easytrieve report column headings