Informix Error -4350
-4350 The program cannot continue a FOR loop at this time because
it is not within a FOR loop.A CONTINUE FOR statement is not between a FOR statement and its matching END FOR statement. Perhaps the FOR statement has been accidentally deleted, or perhaps you changed to another type of loop such as FOREACH or WHILE.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4350 fires when CONTINUE FOR doesn't fall between a FOR statement and its matching END FOR — per the official guidance, the FOR statement may have been accidentally deleted, or
the loop type may have been changed to FOREACH/WHILE without updating the CONTINUE.
CONTINUE FORused where the enclosing loop isn't aFORloop, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check whether the
FORstatement was accidentally deleted, per the official guidance. - If the loop type was changed to
FOREACH/WHILE, update theCONTINUEkeyword to match, per the official guidance.
Examples
CONTINUE FOR inside a WHILE loop
WHILE more_rows
CONTINUE FOR
-- -4350: this is a WHILE loop, not a FOR loop
END WHILE
Corrected
WHILE more_rows
CONTINUE WHILE
END WHILE
Diagnostic Checks
- Check the enclosing loop's actual type, and match the
CONTINUEkeyword to it.
Related Errors / Related Topics
- -4317 — "The program cannot exit a FOR statement at this point because it is not within
a FOR statement." The
EXIT FORcounterpart of this sameCONTINUE FORcondition. - -4351 — "The program cannot continue a WHILE loop at this time because it is not within
a WHILE loop." The same pattern applied to
WHILEinstead ofFOR. - -4352 — "The program cannot continue a FOREACH loop at this time because it is not
within a FOREACH loop." The same pattern applied to
FOREACHinstead ofFOR.
CONTINUE FOR is used outside a FOR loop — match the CONTINUE keyword to the loop's
actual type.