Informix Error -4389
-4389 There are too many levels of nesting of IF statements in this report.
You have exceeded the maximum of five levels of nesting of IF statements. Possibly an END IF statement has been omitted. If not, you will have to revise the logic of the report so that decisions are nested less deeply.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4389 fires when IF statements nest more than five levels deep within a report — per the
official guidance, this is a hard limit on IF nesting inside reports; a missing END IF is
a common contributing cause.
IFstatements nested more than five levels deep in a report, per the official guidance — the direct, only cause.- A missing
END IF, per the official guidance — a related possible cause, artificially deepening the apparent nesting.
Solutions / Resolution
- Check for an omitted
END IFstatement, per the official guidance. - If not, revise the report's logic to nest decisions less deeply, per the official guidance.
Examples
Checking for a missing END IF
Verify every IF in the report has a matching END IF, since a missing one can make later
IF statements appear more deeply nested than intended.
Diagnostic Checks
- Check the report for a missing
END IF, and if none is found, restructure the logic to reduce nesting depth.
Related Errors / Related Topics
- -4397 — "The IF statement at line line-number is not terminated." A closely related
error, about a specific unterminated
IFrather than a general nesting-depth limit.
IF statements nest more than five levels deep in a report — check for a missing END IF,
or restructure the logic.