Easytrieve Report Formatting

Easytrieve built its reputation on turning flat files into readable management reports without hand-coding every carriage control character. Report formatting is the vocabulary you use to describe that layout: how wide each line is, how many lines fit on a page, what appears in the title block, how column headings read, how numeric amounts show commas and dollar signs, and whether fields flow with automatic spacing or land at exact column positions. Beginners often treat PRINT as the formatting command, but PRINT only tells the report writer which records to include. The REPORT statement and its companion definition statements—TITLE, HEADING, LINE—plus MASK pictures on field definitions actually shape the printed page. Broadcom Easytrieve Report Generator 11.6 documents these facilities in the REPORT statement reference, Standard Reports programming chapter, and Create and Format a Report getting-started guide. This tutorial walks through each formatting control, shows how parameters combine on a single report declaration, and explains the spacing algebra that keeps columns from colliding when you change LINESIZE or SPACE. You do not need prior report-writer experience; if you can read a Library DEFINE and write a JOB with PRINT, you can follow the examples below.

Progress0 of 0 lessons

How Formatting Layers Combine

Think of an Easytrieve report page as a stack of horizontal bands. At the top, TITLE lines identify the report and often carry system date and page number on TITLE 01 unless you suppress them. TITLESKIP inserts optional blank lines before the heading area. HEADING statements (or default field names from Library DEFINE) label columns defined on LINE 01. Detail printing executes the full line group—LINE 01 through LINE 99 if you coded multiples—for each PRINT. SKIP adds blank lines between line groups so multi-line logical records breathe visually. PAGESIZE watches the running line count and forces a new page when the logical page fills. LINESIZE caps how many characters any single print line may contain after spacing and masks expand field widths. Every layer reads values from the REPORT statement parameters, so a change to SPACE affects titles, headings, and detail lines consistently unless you override with COL or plus/minus offsets on individual items.

Formatting building blocks and where they are coded
ElementCoded onPrimary effect
REPORT parametersREPORT statementPage width, page length, default spacing, date/page options
TITLEReport definitionReport title block at top of each page
HEADINGReport definition or DEFINEColumn labels above LINE 01 fields
LINEReport definitionDetail and continuation rows in a line group
MASKDEFINE in LibraryEdit picture for numeric display width and punctuation

The REPORT Statement as Formatting Control Center

Every formatted report begins with REPORT followed by an optional report name and a cluster of parameters. Broadcom groups REPORT parameters into format determination, label, file directing, spacing control, and testing aid categories. For formatting beginners, spacing control parameters matter most day to day, but file directing parameters such as PRINTER also affect layout when output targets an extended reporting printer with font metrics. You code REPORT at the end of a JOB activity, immediately before TITLE, HEADING, and LINE definition statements. Site options supply defaults when you omit parameters, which is why a minimal REPORT PAY-RPT LINESIZE 80 still produces dated, paginated, headed output on many installations.

text
1
2
3
4
5
6
7
8
JOB INPUT PERSNL PRINT PAY-RPT REPORT PAY-RPT LINESIZE 80 PAGESIZE 60 SPACE 2 TITLESKIP 1 SKIP 1 TITLE 01 'PAYROLL REGISTER' TITLE 02 'DETAIL BY DEPARTMENT' HEADING GROSS ('GROSS', 'PAY') LINE 01 DEPT EMPNAME GROSS NET-PAY

LINESIZE — Horizontal Layout Boundary

LINESIZE sets the maximum number of data characters that may appear on one print line. Valid values range from 1 to 32,767 per Broadcom documentation. The report writer uses LINESIZE when centering title and heading bands, when verifying that spaced field sequences fit, and when validating COL placements. If your logical record length is known at compile time, LINESIZE defaults to one less than the data portion of that record; otherwise the site option table supplies a default. Choosing LINESIZE 80 is a common batch convention matching classic printer forms, but wide financial reports may use 132 or higher when JCL and spool definitions allow. Remember that printer files also store ASA carriage control in the first character, so the physical data set record must accommodate both control byte and LINESIZE characters. Extended reporting printers relax the tie between LINESIZE and data set record length because font widths and overprint codes expand the physical record differently.

When columns truncate or wrap unexpectedly, compare the sum of formatted field widths plus SPACE-separated gaps against LINESIZE. MASK pictures widen numeric output—a field defined as four packed digits with MASK 'ZZ,ZZ9.99' consumes more positions than raw storage suggests. Either shorten labels, reduce SPACE, use edited fields with shorter pictures, or increase LINESIZE.

PAGESIZE — Vertical Page Budget

PAGESIZE defines the logical print length of a page—the maximum number of lines before Easytrieve performs end-of-page processing and starts a fresh page with titles. Broadcom requires line-page-size to be at least as large as the sum of: the highest TITLE number used, TITLESKIP blank lines, the number of HEADING lines plus one, the highest LINE number in the line group, and SKIP blank lines between groups. In practical terms, at least one complete line group must fit on a page or the compiler rejects the combination. When Easytrieve processes a LINE statement, it compares the current line count to PAGESIZE. If the count is still below the limit, the line prints after optional BEFORE-LINE processing. If the count has reached or exceeded PAGESIZE, ENDPAGE logic runs, titles reprint, and then the detail line prints on the new page.

PAGESIZE also accepts an optional display-page-size second operand. When display-page-size is greater than zero, DISPLAY statements can trigger page breaks independently of detail LINE printing. Setting display-page-size to zero inhibits DISPLAY-generated page breaks while still incrementing the line count. Use the asterisk form PAGESIZE (* 40) when you need to change display behavior without altering the default line-page-size from site options.

SPACE, TITLESKIP, SKIP, and CONTROLSKIP

SPACE — Default Gap Between Items

SPACE on REPORT sets how many blank characters separate adjacent items on TITLE and LINE statements. The default is three spaces on standard installations unless site options or SPREAD override it. TITLE items, heading labels, and detail fields all honor SPACE unless you adjust individual gaps with plus or minus offsets or jump to absolute columns with COL. Tightening SPACE from 3 to 1 packs more columns onto a line but risks fields visually merging when masks expand widths; widening SPACE improves readability on short reports at the cost of horizontal overflow against LINESIZE.

TITLESKIP — Gap After the Title Block

TITLESKIP inserts blank lines between the last TITLE statement and the first HEADING row or LINE 01 when headings are suppressed. Use it to separate the report identity block from column labels the way a printed binder would leave white space below a letterhead. TITLESKIP counts toward the PAGESIZE budget, so aggressive TITLESKIP on short PAGESIZE reports may force early page breaks.

SKIP — Gap Between Line Groups

SKIP defines blank lines inserted after the last LINE in a group before the next LINE 01 begins for the following PRINT. Multi-line line groups—LINE 01 for primary columns, LINE 02 and LINE 03 for address continuation—print as a unit each time PRINT fires; SKIP separates one employee block from the next. A SKIP value of zero allows a line group to span a page boundary; non-zero SKIP inhibits that spanning so related lines stay together when space permits.

CONTROLSKIP — Gap After Control Totals

CONTROLSKIP controls blank lines after CONTROL total lines before detail resumes. When omitted, Broadcom inserts one blank line plus the SKIP value after a control total. Tuning CONTROLSKIP helps auditors visually separate department subtotals from the next detail block without manually coding extra LINE statements.

Spacing parameters at a glance
ParameterSeparatesTypical use
SPACE nAdjacent items on TITLE or LINEDefault 3; overridden by SPREAD
TITLESKIP nTitle block from headings or LINE 01Letterhead breathing room
SKIP nOne line group from the nextMulti-line detail separation
CONTROLSKIP nControl totals from following detailSubtotal visual breaks

TITLE Statements and Page or Date Options

TITLE defines up to 99 title lines printed at the top of each page. Each TITLE carries a line number controlling vertical order within the title area. Title items may be field names or quoted literals. By default Easytrieve centers each title line within the LINESIZE width and separates items with SPACE blanks. On TITLE 01, the product automatically places the system date and current page number unless you override that behavior with REPORT parameters.

NODATE suppresses the date on TITLE 01. LONGDATE prints SYSDATE-LONG; SHORTDATE prints SYSDATE—the classic abbreviated system date field. NOPAGE suppresses the page word (from the PAGEWRD site option) and the running page number. Operations teams rely on date and page on TITLE 01 for matching spool listings to job execution days; suppress them only when a custom TITLE item replaces that information explicitly. NOADJUST left-justifies title lines instead of centering them and is required before COL positioning works on TITLE items.

Title items support the same spacing modifiers as LINE: plus offset, minus offset, and COL column-number. Plus and minus adjust the effective SPACE between consecutive title items. COL places the next item at an absolute column when NOADJUST is active, enabling letterhead layouts that mimic preprinted forms.

text
1
2
3
REPORT FORM-RPT LINESIZE 80 PAGESIZE 58 NOADJUST SHORTDATE TITLE 01 COL 28 'INVENTORY STATUS' TITLE 02 COL 10 'WAREHOUSE:' WHSE-NAME COL 55 'RUN DATE FOLLOWS ABOVE'

HEADING Statements — Column Labels

HEADING overrides the default column label for a field on LINE 01. If you omit HEADING statements and HEADING parameters on DEFINE, Easytrieve uses the field name itself as the heading text. Library DEFINE may already specify HEADING ('SOCIAL' 'SECURITY' 'NUMBER') for a masked field; a report-level HEADING statement overrides that default for the specific report only. Each HEADING associates one field-name with one or more quoted literals. Multiple quoted literals stack vertically over the column, which is how narrow numeric columns still show full words like NET and PAY on separate rows.

Only LINE 01 items receive printed headings. Literals coded on LINE 01 do not get headings. NOHEADING on REPORT suppresses the entire heading block—useful for preprinted forms or label reports where LABELS also suppresses titles and headings automatically. Heading width centers over the wider of the heading text block or the formatted field width on LINE 01, which is why MASK affects heading alignment as well as detail numbers.

text
1
2
3
4
5
6
7
8
FILE PERSNL FB(150 1800) SSN 4 5 P MASK '999-99-9999' HEADING('SOCIAL' 'SECURITY' 'NUMBER') EMPNAME 17 20 A GROSS 90 6 P 2 MASK 'ZZ,ZZZ,ZZ9.99' REPORT PAY-RPT LINESIZE 72 HEADING GROSS ('GROSS', 'AMOUNT') LINE 01 EMPNAME SSN GROSS

LINE Statements and Line Groups

LINE defines the content printed for each logical report row when PRINT executes. A single LINE statement produces one physical row in the line group. Multiple LINE statements—LINE 01, LINE 02, LINE 03—form a line group printed together for each selected record. Line numbers must ascend from 1 to 99 without duplicates. Omitting the line number on the first LINE defaults to LINE 01. Fields may come from active files or working storage; literals in quotes print unchanged on every row of that line number.

Quantitative fields on LINE participate in automatic totaling on control reports unless SUM statements refine behavior—a formatting consideration because totaled fields need MASK widths wide enough for subtotals (see SUMSPACE on control reports). The report writer analyzes LINE items, applies MASK expansion, inserts SPACE separators, and verifies the constructed line length does not exceed LINESIZE. When it does, you see truncation, overlap on extended printers, or compile-time warnings depending on context.

text
1
2
3
4
REPORT ADDR-RPT LINESIZE 80 PAGESIZE 55 SKIP 1 LINE 01 EMPNO EMPNAME DEPT LINE 02 POS 2 STREET-ADDR LINE 03 POS 2 CITY STATE ZIP

POS on LINE 02 and higher aligns continuation items under specific LINE 01 column positions. POS 2 places the next item under the second item on LINE 01—in the example, under EMPNAME rather than EMPNO. POS does not require NOADJUST, unlike COL. Combine POS with multi-line groups when address or comment text should visually nest under a name column instead of restarting at the left margin.

MASK — Numeric Edit Pictures on DEFINE

MASK is coded on the DEFINE statement in the Library section, not on LINE directly. The MASK parameter accepts a quoted edit picture that transforms internal numeric storage into display characters when the field prints. Broadcom's getting-started example uses MASK '$$,$$9.99' on a salary field so gross pay prints with a dollar sign, comma thousands separator, and two decimal places. Picture characters follow familiar mainframe conventions: 9 for mandatory digit, Z for zero suppression, comma and period as punctuation, S or CR for sign control, and currency symbols where supported.

MASK affects both detail columns and heading centering because headings allocate width based on formatted field size. A packed field defined as four bytes with MASK 'ZZ,ZZ9.99' occupies more heading space than the raw field name EMP#. Separate calculation fields from display fields when programs also perform arithmetic—keep GROSS in packed form for ADD and TOTAL statements, then MOVE edited values into display-only A fields if you need custom formatting beyond MASK. Overflow often appears as asterisks when the value magnitude exceeds picture width; widen the MASK or the DEFINE length rather than blaming PRINT.

Common MASK patterns for report columns
MASK exampleTypical sourcePrinted appearance
'ZZ,ZZ9.99'Packed amount 1234.51,234.50
'$$$,$$9.99'Packed salary$1,234.56
'999-99-9999'Numeric SSN storage123-45-6789
'ZZ9.9-'Signed quantity12.3-

COL, Offset, and Absolute Positioning

Easytrieve supports three related positioning tools. SPACE establishes the baseline gap between items. Plus offset and minus offset on TITLE or LINE add to or subtract from SPACE for the gap before the next item—useful when one column needs an extra blank but you do not want to change global SPACE for the entire report. COL column-number places the next item at an absolute print column counting from one, but Broadcom requires NOADJUST on REPORT whenever COL appears on TITLE or LINE because centered automatic layout conflicts with absolute coordinates.

POS position-number applies only on LINE 02 and above, aligning continuation fields under the nth item from LINE 01. Form-style reports combine NOADJUST, COL on title and detail lines, and MASK for currency boxes at fixed positions—similar to Broadcom's Standard Reports W-2 style example with COL 7, COL 23, and COL 39 on the same LINE. Test COL layouts with the same LINESIZE used in production; changing LINESIZE without revisiting COL values shifts entire columns. On extended reporting printers with multiple fonts, exact COL alignment may vary if font widths differ within one line.

text
1
2
3
4
REPORT W2-FMT LINESIZE 80 PAGESIZE 62 NOADJUST SPACE 1 LINE 01 COL 7 'EMPLOYER NAME' COL 33 'EIN' COL 39 '123456789' LINE 10 COL 7 SSN +2 COL 23 YTD-TAX COL 39 YTD-WAGES LINE 12 COL 7 EMP-NAME COL 39 YTD-WAGES

NOADJUST, SPREAD, and Centering Behavior

Default report formatting centers title lines and LINE 01 heading bands within LINESIZE. NOADJUST switches to left justification for titles and body layout and enables COL placement. SPREAD inserts the maximum possible spaces between columns to consume the full LINESIZE width—helpful when you want headings evenly distributed across wide paper. Broadcom documents SPREAD and NOADJUST as mutually exclusive. SPREAD overrides SPACE when active. NOSPREAD deactivates a site-default SPREAD. Choose centered automatic layout for quick listings; choose NOADJUST plus COL for forms and checks that must align to preprinted boxes.

End-to-End Example — Parameters Working Together

The following skeleton shows how formatting parameters cooperate on one report. PAGESIZE 56 reserves vertical room for two TITLE lines, one TITLESKIP blank, two heading rows from stacked HEADING literals, three detail lines in the group, and one SKIP line between employees. LINESIZE 72 limits horizontal width. SPACE 2 separates columns on titles and details. SHORTDATE keeps the system date on TITLE 01 while NOPAGE is omitted so page numbers still print. MASK on Library fields formats amounts before LINE references them. POS aligns address lines under the employee name column.

text
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FILE PERSNL FB(150 1800) EMPNO 1 5 N EMPNAME 17 20 A DEPT 45 3 A GROSS 90 6 P 2 MASK 'ZZ,ZZZ,ZZ9.99' NET-PAY 96 6 P 2 MASK 'ZZ,ZZZ,ZZ9.99' STREET 110 25 A CITY 135 15 A JOB INPUT PERSNL PRINT EMP-RPT REPORT EMP-RPT LINESIZE 72 PAGESIZE 56 SPACE 2 TITLESKIP 1 SKIP 1 SHORTDATE TITLE 01 'EMPLOYEE COMPENSATION LISTING' TITLE 02 'CONFIDENTIAL — PAYROLL USE ONLY' HEADING GROSS ('GROSS', 'PAY') HEADING NET-PAY ('NET', 'PAY') LINE 01 EMPNO EMPNAME DEPT GROSS NET-PAY LINE 02 POS 2 STREET LINE 03 POS 2 CITY

Common Formatting Mistakes

  • PAGESIZE too small for TITLE count plus line group plus SKIP—compiler or runtime layout failure.
  • Using COL without NOADJUST on REPORT—absolute columns ignored or compile error.
  • MASK too narrow for subtotaled amounts on control reports—asterisk overflow on SUM lines.
  • Expecting LINE 02 items to generate column headings—they do not; only LINE 01 drives HEADING.
  • Changing SPACE without retesting COL-based forms designed for SPACE 1.
  • Printing packed fields with no MASK and wondering why columns show unreadable hex-like output.
  • Assuming NOPAGE removes titles—it only suppresses page number and page word on TITLE 01.

Testing Formatted Reports

  1. Print a known small input file and measure column positions against a ruler or monospace viewer.
  2. Vary one parameter at a time—SPACE, TITLESKIP, SKIP—to see vertical spacing effects.
  3. Force a page break by lowering PAGESIZE temporarily and confirm titles and date reprint.
  4. Compare masked amounts to manual calculator results for implied decimal alignment.
  5. Review TITLE 01 with and without NODATE and NOPAGE for operations acceptance.
  6. When using COL, test longest expected field values under each MASK at max LINESIZE.

Explain It Like I'm Five

Making an Easytrieve report is like setting up a worksheet before you write names down. REPORT tells the computer how wide the paper is (LINESIZE) and how many rows fit on one page (PAGESIZE). TITLE is the big name at the top—like the title of your notebook—and the computer can also write today's date and page numbers there unless you say NODATE or NOPAGE. HEADING is the row of labels above each column, like Name and Pay. LINE is where the actual answers go each time PRINT picks someone to show. MASK is a stencil for numbers so 1234 becomes money with commas instead of a blob of digits. SPACE is how many finger-width gaps you leave between columns. TITLESKIP and SKIP are extra blank rows—one after the title, one between people. COL is putting a word exactly on line 13 of the page instead of letting the computer center everything automatically—you must say NOADJUST first so the computer stops centering. When all of these agree, every page looks neat; when one setting is too small, words bump into each other or spill to the next page.

Exercises

  1. Write a REPORT declaration with LINESIZE 80, PAGESIZE 60, SPACE 3, TITLESKIP 1, and SKIP 2. Include two TITLE lines and one LINE 01 with three fields.
  2. Add MASK '$$$,$$9.99' to a packed amount field in Library DEFINE and explain how heading width changes versus an unmasked field.
  3. Convert a centered listing to a form layout: add NOADJUST and place two TITLE literals using COL 10 and COL 50.
  4. Create a three-line line group with LINE 01 for EMPNO and EMPNAME and LINE 02 using POS 2 for a street address field.
  5. List the REPORT parameters that suppress automatic date or page number printing and describe when operations staff might still want them visible.
  6. Calculate whether PAGESIZE 30 is viable when you use TITLE 01 and TITLE 02, TITLESKIP 2, two heading rows, LINE 01 through LINE 03, and SKIP 1 between groups. Show the arithmetic Broadcom requires.

Quiz

Test Your Knowledge

1. Which REPORT parameter sets the maximum characters per printed line?

  • PAGESIZE
  • LINESIZE
  • TITLESKIP
  • CONTROLSKIP

2. Default title line placement on a standard report is:

  • Left-justified unless NOADJUST
  • Centered within LINESIZE unless NOADJUST
  • Right-justified always
  • Suppressed unless HEADING coded

3. COL positioning on LINE or TITLE requires:

  • NOADJUST on the REPORT statement
  • NOPAGE on REPORT
  • XML on REPORT
  • LABELS on REPORT

4. MASK on a DEFINE statement primarily controls:

  • Numeric edit picture for printed field values
  • JCL DD allocation
  • Sort sequence keys
  • Screen map colors

5. TITLESKIP inserts blank lines between:

  • Last TITLE line and first HEADING or LINE 01
  • Every detail line
  • Control break totals only
  • JCL steps
Published
Read time18 min
AuthorMainframeMaster
Reviewed by MainframeMaster teamVerified: Broadcom Easytrieve Report Generator 11.6 REPORT, TITLE, HEADING, LINE, MASK, LINESIZE, PAGESIZE, SPACE, SKIP, and COL formattingSources: Broadcom Easytrieve 11.6 REPORT Statement, LINE Statement, HEADING Statement, Standard Reports, Create and Format a ReportApplies to: Easytrieve batch report formatting and layout