Informix Error -695
-695 Argument is not a parameter of procedure procedure-name.
A named parameter was passed to a procedure, but the named parameter does not exist.
Example of error:
CREATE PROCEDURE testproc (arg1 INT, arg2 INT) RETURNING INT; ... RETURN 1; END PROCEDURE
SELECT col FROM tab WHERE testproc (arg1 = 10, arg5 = 20); -- error
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-695 fires when a named-argument procedure call uses a parameter name that doesn't exist on the
procedure — per the official guidance's example, calling a procedure declared with parameters
arg1/arg2 using a named argument arg5 that was never declared.
- A misspelled named-argument name, per the official guidance's example — the most common, direct cause.
- A named argument left over from an earlier version of the procedure's parameter list, no longer present after the procedure was redefined with different parameter names.
- A call written against the wrong (similarly-named) procedure, whose actual parameter names differ from the ones used in the call.
Solutions / Resolution
- Review the procedure's actual declared parameter names, per the official guidance, and
correct the named argument to match.
sysproceduresdoesn't expose parameter names directly (onlynumargs, the count); reviewing the procedure's ownCREATE PROCEDUREsource viasysprocbodyis the reliable way to confirm them:
(SELECT data FROM sysprocbody WHERE procid = (SELECT procid FROM sysprocedures WHERE procname = 'testproc') AND datakey = 'T' ORDER BY seqno;datakey = 'T'selects the routine's text rows;sysprocbodystores the source one line per row, so ordering byseqnoreconstructs it, the same pattern assysviewsfor -583.) - Confirm the correct procedure is being called, in case a similarly-named one with different parameter names was intended.
Examples
The disallowed attempt
CREATE PROCEDURE testproc(arg1 INT, arg2 CHAR(10))
...
END PROCEDURE;
EXECUTE PROCEDURE testproc(arg1 = 10, arg5 = 'x');
-- -695: arg5 isn't a parameter of testproc
Corrected
EXECUTE PROCEDURE testproc(arg1 = 10, arg2 = 'x');
Diagnostic Checks
- Review the procedure's
CREATE PROCEDUREsource (viasysprocbody, or the original DDL if available) to confirm its exact parameter names.
Related Errors / Related Topics
- -671 — "Routine invocation routine-name has duplicate parameter name." A related named- argument error, about repeating a valid parameter name rather than using one that doesn't exist.
- -694 — "Too many arguments passed to procedure procedure-name." A related argument-count error, in the positional-argument context rather than named arguments.
Check the procedure's actual declared parameter names (via its source in sysprocbody) rather
than assuming from memory or a similarly-named procedure.