Informix Error -4664
Cause and resolution
CCL class declarations are required with the "-useccl" switch. Add INCLUDE SYSTEM "ixstmt.4gh" to your module.
To compile a REPORT or the MAIN program block with the -useccl switch, the user needs to include ixstmt.4gh.
This statement has calls to functions nested within the parameter lists of other function calls, to a level exceeding four. A maximum level of four is supported, as in the following expression: Afun(2-Bfun(3+Cfun(4*Dfun(5))))
Rewrite the expression to store the result of the innermost function calls in a variable, and use the variable in the expression.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4664 bundles two distinct messages on the official page. The first: compiling a REPORT or
the MAIN program block with the -useccl switch requires including ixstmt.4gh, per the
official guidance. The second: a statement nests function calls within the parameter lists of
other function calls to a level exceeding four, per the official guidance — a maximum nesting
level of four is supported.
- Compiling with
-usecclwithoutINCLUDE SYSTEM "ixstmt.4gh", per the official guidance — the first named cause. - Function calls nested more than four levels deep within parameter lists, per the
official guidance — the second named cause, illustrated by
Afun(2-Bfun(3+Cfun(4*Dfun(5))))as the maximum supported depth.
Solutions / Resolution
- Add
INCLUDE SYSTEM "ixstmt.4gh"to the module, per the official guidance, when compiling aREPORTorMAINblock with-useccl. - Rewrite the expression to store the result of the innermost function calls in a variable, and use the variable in the expression, per the official guidance, if the nesting-depth limit is exceeded.
Examples
Exceeding the four-level nesting limit
LET x = Afun(2 - Bfun(3 + Cfun(4 * Dfun(5 + Efun(6)))))
-- -4664: five levels of nested function calls, one over the limit
Corrected
LET inner = Efun(6)
LET x = Afun(2 - Bfun(3 + Cfun(4 * Dfun(5 + inner))))
Diagnostic Checks
- If compiling with
-useccl, check forINCLUDE SYSTEM "ixstmt.4gh"in the module. - If not, count the nesting depth of function calls within parameter lists, and flatten any expression exceeding four levels using a temporary variable.
Related Errors / Related Topics
- -4663 — "ODBC error from engine - "text"." A related
-useccl-specific compiler error, about an ODBC-level failure rather than a missing include or nesting-depth limit.
Either -useccl compilation is missing INCLUDE SYSTEM "ixstmt.4gh", or an expression nests
function calls more than four levels deep — add the include, or flatten the expression using a
temporary variable.