Informix Error -4628
-4628 The program cannot exit a DISPLAY ARRAY statement at this point
because it is not within a DISPLAY ARRAY statement.The current statement is EXIT DISPLAY but it is not in the context of an DISPLAY statement. Inspect the source module backward from this point to determine what happened to the DISPLAY statement. Perhaps the current statement was misplaced, or perhaps an END DISPLAY statement was inserted at an earlier point.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4628 fires when EXIT DISPLAY appears outside the context of a DISPLAY ARRAY statement —
per the official guidance, inspect the source backward from this point to determine what
happened to the enclosing DISPLAY statement.
EXIT DISPLAYmisplaced outside anyDISPLAY ARRAYstatement, per the official guidance — the first named cause.- An
END DISPLAYstatement inserted earlier than intended, per the official guidance — the second named cause, closing theDISPLAY ARRAYblock before thisEXIT DISPLAYis reached.
Solutions / Resolution
- Inspect the source module backward from this point, per the official guidance, to
find what happened to the enclosing
DISPLAY ARRAYstatement. - Move the misplaced
EXIT DISPLAY, or remove/relocate an incorrectly earlyEND DISPLAY, as appropriate.
Examples
An EXIT DISPLAY after an early END DISPLAY
DISPLAY ARRAY items TO scr.*
...
END DISPLAY
EXIT DISPLAY
-- -4628: END DISPLAY already closed the block above
Diagnostic Checks
- Trace backward from the flagged
EXIT DISPLAYto locate the enclosingDISPLAY ARRAYstatement (or an unexpectedly earlyEND DISPLAY), and correct the block structure.
Related Errors / Related Topics
- -4627 — "The program cannot exit an INPUT statement at this point because it is not
within an INPUT statement." The same scope-mismatch condition, for
INPUTrather thanDISPLAY ARRAY. - -4488 — "The program cannot CONTINUE or EXIT statement-type at this point because it is not immediately within statement-type statement." The general, statement-type-parameterized version of this same condition.
EXIT DISPLAY appears outside a DISPLAY ARRAY statement's context — trace backward to find
the actual (or incorrectly early) block boundary.