Informix Error -7531: Invalid user defined routine type: must be function or procedure.
Cause and resolution
Invalid user defined routine type: must be function or procedure.
Specified user-defined routine must be a function or a procedure. Verify name and definition of routine to be called.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-7531 fires when a specified UDR resolves to something other than a function or procedure — per the official guidance.
- The specified routine isn't a function or a procedure, per the official guidance — the direct, only cause.
Solutions / Resolution
- Verify the name and definition of the routine to be called, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a routine that resolves to something other than a function or procedure.
Diagnostic Checks
- Check the routine's name and its definition, and confirm it's actually a function or procedure.
Related Errors / Related Topics
- -7530 — "Missing parenthesis in the signature specified for user-defined routine lookup." A related UDR-lookup error, about signature syntax rather than the routine's type.
- -7533 — "Error in user-defined-routine lookup: Specified user-defined routine not found." A related UDR-lookup error, about the routine not existing at all rather than existing with an unsupported type.
A specified UDR isn't a function or procedure — verify its name and definition.