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.
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.
| Element | Coded on | Primary effect |
|---|---|---|
| REPORT parameters | REPORT statement | Page width, page length, default spacing, date/page options |
| TITLE | Report definition | Report title block at top of each page |
| HEADING | Report definition or DEFINE | Column labels above LINE 01 fields |
| LINE | Report definition | Detail and continuation rows in a line group |
| MASK | DEFINE in Library | Edit picture for numeric display width and punctuation |
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.
12345678JOB 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 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 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 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 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 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 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.
| Parameter | Separates | Typical use |
|---|---|---|
| SPACE n | Adjacent items on TITLE or LINE | Default 3; overridden by SPREAD |
| TITLESKIP n | Title block from headings or LINE 01 | Letterhead breathing room |
| SKIP n | One line group from the next | Multi-line detail separation |
| CONTROLSKIP n | Control totals from following detail | Subtotal visual breaks |
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.
123REPORT 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 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.
12345678FILE 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 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.
1234REPORT 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 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.
| MASK example | Typical source | Printed appearance |
|---|---|---|
| 'ZZ,ZZ9.99' | Packed amount 1234.5 | 1,234.50 |
| '$$$,$$9.99' | Packed salary | $1,234.56 |
| '999-99-9999' | Numeric SSN storage | 123-45-6789 |
| 'ZZ9.9-' | Signed quantity | 12.3- |
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.
1234REPORT 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
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.
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.
1234567891011121314151617181920FILE 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
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.
1. Which REPORT parameter sets the maximum characters per printed line?
2. Default title line placement on a standard report is:
3. COL positioning on LINE or TITLE requires:
4. MASK on a DEFINE statement primarily controls:
5. TITLESKIP inserts blank lines between: