Informix Error -9715: A procedure cannot have any OUT parameters.
Cause and resolution
A procedure cannot have any OUT parameters.
A CREATE PROCEDURE function cannot have OUT parameters. Only a CREATE FUNCTION statement can have OUT parameters in the parameter. The parameter specified as OUT should be the only and last parameter.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9715 fires when a CREATE PROCEDURE statement specifies an OUT parameter — per the official guidance.
- An OUT parameter on a procedure, per the official guidance — the direct, only cause; only CREATE FUNCTION can have an OUT parameter, and it must be the only and last parameter.
Solutions / Resolution
- Use CREATE FUNCTION instead, per the official guidance, if an OUT parameter is needed.
- Or remove the OUT option, per the official guidance, if a procedure is correct.
Examples
An OUT parameter on a procedure
CREATE PROCEDURE my_proc(a INT, b OUT INT) ...; -- -9715
Corrected
CREATE FUNCTION my_func(a INT, b OUT INT) RETURNING INT ...;
Diagnostic Checks
- Check whether the routine is a procedure with an OUT parameter, and switch to CREATE FUNCTION or remove OUT.
Related Errors / Related Topics
- -9714 — "OUT parameter can only be the last parameter of a routine." A related OUT-parameter restriction, on positioning rather than whether OUT is allowed at all.
A procedure had an OUT parameter, which isn't allowed — use CREATE FUNCTION or remove OUT.