Informix Error -4123
-4123 CALL to function "name" must have a RETURNING clause.
The function name is declared as returning a result, so the CALL statement must provide a RETURNING clause to receive the result.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4123 fires when CALL invokes a function declared to return a result, but the CALL
statement has no RETURNING clause to receive it — per the official guidance, the function's
declaration requires a result to be captured.
- A
CALLto a result-returning function with noRETURNINGclause, per the official guidance — the direct, only cause.
Solutions / Resolution
- Add a
RETURNINGclause to theCALLstatement to receive the function's result.
Examples
A CALL missing RETURNING
FUNCTION save(id INTEGER) RETURNING INTEGER
...
END FUNCTION
CALL save(1001)
-- -4123: save() returns a value that isn't captured
Corrected
CALL save(1001) RETURNING status
Diagnostic Checks
- Check every
CALLto a result-returning function, and confirm it has a matchingRETURNINGclause.
Related Errors / Related Topics
- -4063 — "Function "name" should not return any results." The mirror-image error, about
a
VOIDfunction being called as if it returned a value.
A CALL to a result-returning function is missing its RETURNING clause — add one.