Informix Error -4493: Named parameters are allowed only for formal functions/reports.
Cause and resolution
Named parameters are allowed only for formal functions/reports.
The indicated function reference uses named parameters, but the declaration of the function or report used the informal style of parameter declaration, in which only the names are specified in the parameter list and the types are specified in subsequent, subsidiary declarations.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4493 fires when a call uses named parameters against a function/report declared with the informal style — per the official guidance, the informal style specifies only names in the parameter list, with types given in subsequent subsidiary declarations, and doesn't support named-parameter calls.
- A call using named parameters against an informally-declared function/report, per the official guidance — the direct, only cause.
Solutions / Resolution
- Declare the function/report formally (with a full prototype) if named-parameter calls are needed, or
- Call it positionally instead of by name.
Examples
Named-parameter call against an informal declaration
FUNCTION save(id)
DEFINE id INTEGER
END FUNCTION
CALL save(id: 1001)
-- -4493: save() is declared informally
Corrected
FUNCTION save(id INTEGER) RETURNING INTEGER
...
END FUNCTION
CALL save(id: 1001)
Diagnostic Checks
- Check whether the called function/report is declared formally or informally, and either switch to a formal declaration or call it positionally.
Related Errors / Related Topics
- -4111 — "Warning: The function name is declared informally. For stronger type checking, use a function defined formally." A related informal-declaration warning covering the same underlying informal/formal distinction.
- -4494 — "Missing named parameter "name" does not have default value." A related named-parameter error, about a missing required parameter in a formal call.
- -4495 — "Duplicate or invalid parameter name." A related named-parameter error, about the parameter name itself being wrong rather than the function being informally declared.
Named parameters were used to call an informally-declared function/report — declare it formally, or call it positionally.