Informix Error -8122
-8122 NEED n LINES may not be used in PAGE HEADER or PAGE TRAILER clauses.
The PRINT statements in a page header or trailer establishes its size. To set a larger size, use PRINT statements with no parameters.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8122 fires when NEED n LINES is used inside a PAGE HEADER/PAGE TRAILER clause — per the
official guidance, a header/trailer's size is established by its PRINT statements.
NEED n LINESused inside aPAGE HEADER/PAGE TRAILERclause, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use
PRINTstatements with no parameters to set a larger size, per the official guidance, instead ofNEED n LINES.
Examples
NEED n LINES inside a PAGE HEADER
PAGE HEADER
NEED 3 LINES
-- -8122: NEED isn't allowed in PAGE HEADER/TRAILER
Corrected
PAGE HEADER
PRINT "Order Report"
PRINT
PRINT
Diagnostic Checks
- Check
PAGE HEADER/PAGE TRAILERclauses forNEED n LINES, and replace it with blankPRINTstatements to reserve space.
Related Errors / Related Topics
- -8109 — "Wordwrap may not be used within PAGE HEADERS or TRAILERS." A related
header/trailer restriction, about
WORDWRAPrather thanNEED n LINES. - -8123 — "The PRINT FILE command is not allowed within the FIRST PAGE HEADER, PAGE
HEADER, or PAGE TRAILER clauses." A related header/trailer restriction, about
PRINT FILErather thanNEED n LINES.
NEED n LINES is used inside PAGE HEADER/PAGE TRAILER — use blank PRINT statements
instead.