Informix Error -21609: Unmatched ^ELSE at line line-number.
Cause and resolution
Unmatched ^ELSE at line line-number.
If this internal error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-21609 fires when an mkmessage input file's preprocessor encounters an ^ELSE
directive with no matching ^ifdef/^ifndef — per the official guidance.
- An
^ELSEdirective 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^ELSE, per the official guidance's implication.
Examples
An unmatched ^ELSE
^ELSE
Some text.
^ENDIF
Corrected
^ifdef SOME_MACRO
Some text.
^ELSE
Other 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
- -21610 — "Unmatched ^ENDIF at line line-number." The equivalent unmatched-directive
error, for
^ENDIFrather than^ELSE. - -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
^ELSE.
An ^ELSE directive had no matching ^ifdef/^ifndef — balance the preprocessor block.