Informix Error -21610: Unmatched ^ENDIF at line line-number.
Cause and resolution
Unmatched ^ENDIF at line line-number.
If this internal error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-21610 fires when an mkmessage input file's preprocessor encounters an ^ENDIF
directive with no matching ^ifdef/^ifndef — per the official guidance.
- An
^ENDIFdirective with no preceding matching^ifdef/^ifndef, per the official guidance — the direct, only cause.
Solutions / Resolution
- Add the missing
^ifdef/^ifndef, or remove the stray^ENDIF, per the official guidance's implication.
Examples
An unmatched ^ENDIF
Some text.
^ENDIF
Corrected
^ifdef SOME_MACRO
Some text.
^ENDIF
Diagnostic Checks
- Check the preprocessor block containing the reported line number for a matching
^ifdef/^ifndef, and add or remove directives to balance it.
Related Errors / Related Topics
- -21609 — "Unmatched ^ELSE at line line-number." The equivalent unmatched-directive
error, for
^ELSErather than^ENDIF. - -21612 — "Unexpected EOF. Expected an ^endif." The mirror-image condition — the
file ended while still expecting an
^ENDIF, rather than finding an unmatched one. - -21613 — "Syntax error at line line-number. Expect ifdef, ifndef, else or endif."
A related preprocessor syntax error, general to any malformed directive rather than
specifically an unmatched
^ENDIF.
An ^ENDIF directive had no matching ^ifdef/^ifndef — balance the preprocessor block.