Long listings need pages—not one endless scroll of 40,000 detail lines. The Easytrieve report writer paginates automatically when REPORT declares PAGESIZE: after N detail lines, it breaks to a new page, reprints TITLE headings, and continues. PAGE-related statements and ENDPAGE PROC hooks let you customize what happens at boundaries—extra blank lines, footing totals, suppressed headings on continuation pages, or forced eject before major control breaks. Beginners set PAGESIZE 60 but LINESIZE 200 on 132-column SYSOUT and wonder why lines wrap wrong. This page teaches PAGESIZE and LINESIZE interaction, TITLE repetition on new pages, ENDPAGE procedure timing, SKIP after page break, pairing with HEADING and FOOTING, and operational SYSOUT class limits. Read REPORT and TITLE tutorials first for subactivity context.
123REPORT DETAIL-RPT LINESIZE 132 PAGESIZE 60 TITLE 'PAYROLL DETAIL' 'DEPT' DEPT-ID 'PAGE' LINE EMP-NO NAME SALARY
PAGESIZE 60 means roughly sixty detail lines per page before break—TITLE and heading lines may consume additional physical lines per release rules; test with shop sample. LINESIZE 132 matches standard SYSOUT carriage control listing width. Adjust PAGESIZE when HEADING and FOOTING consume vertical space so detail does not overflow physical page on laser printers.
| Setting | Controls | If wrong |
|---|---|---|
| LINESIZE 132 | Logical columns per line | Truncation or wrap |
| PAGESIZE 60 | Detail lines per page | Too many lines per sheet |
| SYSOUT LRECL | Physical spool record | JES truncation |
| CC char | Printer carriage control | Form feed ignored |
When automatic page break fires, report writer reissues TITLE lines defined in REPORT block. First TITLE line might be report name; second might be run date and page token. Without TITLE, new pages look like raw detail—operators cannot identify job. Multiple TITLE statements stack heading rows at each page top. Distinguish TITLE (report statement) from TITLE in activity section elsewhere—context is REPORT subactivity only here.
Broadcom report writer documents PAGE for page eject and page-oriented layout control within REPORT—forcing immediate new page before next detail, or spacing rules at boundaries. Exact syntax varies by release; common pattern is PAGE as standalone report statement causing eject so next PRINT detail starts fresh page with headings. Use sparingly—excessive forced PAGE wastes paper and inflates spool volume.
123456REPORT SUMMARY LINESIZE 132 PAGESIZE 55 TITLE 'REGION SUMMARY' LINE REGION TOTAL-AMT CONTROL REGION PAGE LINE ' ' * optional spacing per release
ENDPAGE. PROC is special-name hook running at end of each page—print footing line, accumulate page-level counters, write audit stamp. Coded immediately after REPORT block like BEFORE-LINE. Keep ENDPAGE logic light—heavy I/O inside page hooks slows large reports. INVALID statements inside ENDPAGE follow report procedure restrictions for your release.
SKIP advances vertical space on report—blank lines before detail or after headings. Combined with PAGESIZE, SKIP lines count toward vertical consumption. SKIP 0 at control break may suppress extra space; SKIP 2 before summary line improves readability. Over-SKIP triggers early page break when line budget exhausted.
HEADING statements define lines printed at page top beyond TITLE—column headers repeating each page. FOOTING defines bottom lines—run time, user id, confidential notice. PAGE breaks reprint HEADING per rules; FOOTING prints at page bottom before eject. Coordinate three tutorials: HEADING, FOOTING, PAGE, for complete listing layout.
CONTROL on REGION may optionally start new page when region changes—release parameters on CONTROL or BEFORE-BREAK PROC with PAGE eject. Departmental listings often page-break per dept so operators distribute stacks. BEFORE-BREAK PROC can conditionally issue page-oriented statements when break level is major.
Page number fields in TITLE—sequential page counter maintained by report writer. See page-numbers tutorial for symbolic names your release provides. External auditors expect consecutive numbering on archived SYSOUT—verify reprint and SORT does not reset counter unexpectedly when multiple REPORT blocks exist.
PAGESIZE is how many sentences fit on one piece of paper before you staple a new sheet. TITLE is the header you rewrite at the top of every new sheet. PAGE is telling the printer "start a new sheet right now" even if the current sheet is not full. ENDPAGE is a little note you add at the bottom of each sheet before flipping to the next.
1. PAGESIZE on REPORT controls:
2. PAGE statement in report context often:
3. TITLE lines typically reprint:
4. ENDPAGE PROC runs:
5. LINESIZE should align with: