Informix Error -8123
-8123 The PRINT FILE command is not allowed within the FIRST PAGE HEADER,
PAGE HEADER, or PAGE TRAILER clauses.ACEPREP needs to know how many lines will be filled in header and trailer sections (otherwise, it does not know how many detail rows to put on the page). Because the size of a file cannot be predicted when the report is compiled, the PRINT FILE command is not allowed. You must use PRINT statements to produce the data.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8123 fires when PRINT FILE is used inside FIRST PAGE HEADER, PAGE HEADER, or PAGE TRAILER — per the official guidance, ACEPREP needs a predictable header/trailer line
count, and a file's size can't be predicted at compile time.
PRINT FILEused inside a header/trailer clause, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use
PRINTstatements to produce the data, per the official guidance, instead ofPRINT FILE.
Examples
PRINT FILE inside a PAGE HEADER
PAGE HEADER
PRINT FILE "logo.txt"
-- -8123: PRINT FILE isn't allowed in headers/trailers
Corrected
PAGE HEADER
PRINT "Order Report"
Diagnostic Checks
- Check
FIRST PAGE HEADER/PAGE HEADER/PAGE TRAILERclauses forPRINT FILE, and replace it withPRINTstatements.
Related Errors / Related Topics
- -8109 — "Wordwrap may not be used within PAGE HEADERS or TRAILERS." A related
header/trailer restriction, about
WORDWRAPrather thanPRINT FILE. - -8122 — "NEED n LINES may not be used in PAGE HEADER or PAGE TRAILER clauses." A
related header/trailer restriction, about
NEED n LINESrather thanPRINT FILE.
PRINT FILE is used inside a header/trailer clause — use PRINT statements instead.