Informix Error -8056: Skipping lines inside of WHILE or FOR loops is not allowed within PAGE HEADER or TRAILER.
Cause and resolution
Skipping lines inside of WHILE or FOR loops is not allowed within PAGE HEADER or TRAILER.
ACEPREP needs to determine how many lines of space to devote to the page header and trailer (otherwise, it does not know how many detail rows to allow on the page). It cannot predict how many times a loop will be executed, so it has to forbid the use of SKIP statements in loops in these sections.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8056 fires when a SKIP statement appears inside a WHILE/FOR loop within PAGE HEADER/TRAILER — per the official guidance, ACEPREP needs to predict how many lines the
header/trailer occupies, and can't predict how many times a loop will execute.
- A
SKIPstatement inside aWHILE/FORloop withinPAGE HEADER/TRAILER, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the
SKIPstatement from the loop, or restructure the header/trailer to avoid looped skips, sinceACEPREPcan't predict the loop's execution count.
Examples
A SKIP inside a loop in PAGE HEADER
PAGE HEADER
WHILE i < 3
SKIP 1 LINE
-- -8056: loop iteration count is unpredictable
LET i = i + 1
END WHILE
Corrected
PAGE HEADER
SKIP 3 LINES
Diagnostic Checks
- Check
PAGE HEADER/TRAILERfor anySKIPstatement inside aWHILE/FORloop, and replace it with a fixed-countSKIPoutside the loop.
Related Errors / Related Topics
- -8001 — "The number of newlines specified for TOP MARGIN, FIRST PAGE HEADER (PAGE HEADER), PAGE TRAILER, and BOTTOM MARGIN must leave enough room..." A related header/trailer line-count restriction, about the combined margin/header/trailer size rather than unpredictable loop-based skipping.
A SKIP statement is inside a loop within PAGE HEADER/TRAILER, whose execution count
ACEPREP can't predict — use a fixed-count SKIP outside the loop instead.