Informix Error -8011: The user function called name has not yet been defined by the user.
Cause and resolution
The user function called name has not yet been defined by the user.
A call was made to a function with the name shown. ACE assumes that it is an external C function. However, external functions must be defined in the DEFINE section of the report using FUNCTION funcname statements, and this name is not defined. If name was intended as the name of an external function, insert a FUNCTION statement for it.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8011 fires when a report calls a function ACE assumes is external C, but that hasn't been declared — per the official guidance.
- A call to a function not declared in the
DEFINEsection via aFUNCTION funcnamestatement, per the official guidance — the direct, only cause.
Solutions / Resolution
- Insert a
FUNCTIONstatement for the named function, per the official guidance, in theDEFINEsection, if it was intended as an external function.
Examples
An undeclared external function call
PRINT compute_discount(order_total)
-- -8011: compute_discount is not declared as an external function
Corrected
DEFINE
FUNCTION compute_discount(amount)
Diagnostic Checks
- Check the
DEFINEsection for aFUNCTIONstatement matching the called function's name, and add one if it's missing.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -8011 in this set yet.
A called function isn't declared with FUNCTION in the DEFINE section — add the
declaration.