Informix Error -10000: Argument must be a variable to be an OUT or INOUT parameter.
Cause and resolution
Argument must be a variable to be an OUT or INOUT parameter.
The corresponding arguments to UDRs with OUT or INOUT parameters must be specified as variables when the routine is called from a client such as DRDA. Constants cannot be used as an argument for an OUT or INOUT parameter in such cases.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-10000 fires when a UDR with an OUT or INOUT parameter is called from a client such as DRDA with a constant in that argument position — per the official guidance.
- A constant supplied for a UDR's OUT/INOUT parameter when calling from a client such as DRDA, per the official guidance — the direct, only cause; such arguments must be variables.
Solutions / Resolution
- Specify a variable, not a constant, for the OUT/INOUT parameter's corresponding argument, per the official guidance.
Examples
A constant passed for an OUT parameter
CALL my_proc(1, 100); -- -10000 if the second parameter is OUT/INOUT and 100 is a constant
Corrected
CALL my_proc(1, :out_var);
Diagnostic Checks
- Check the call's arguments against the routine's OUT/INOUT parameter positions, and replace any constant there with a variable.
Related Errors / Related Topics
- -9752 — "Argument must be a Statement Local Variable or SPL variable or argument for an OUT or INOUT parameter." A related OUT/INOUT-argument restriction, on the argument needing to be an SLV/SPL variable in a WHERE-clause UDR call rather than a client call such as DRDA.
A constant was passed for a UDR's OUT/INOUT parameter from a client like DRDA — use a variable instead.