Informix Error -1379
-1379 Report functions may not be called directly. Use the OUTPUT
TO REPORT statement.A report function has been entered as a result of a CALL statement. Report functions can only be executed using the START REPORT, FINISH REPORT, and OUTPUT TO REPORT statements. Review the program. Look for places where the report function name is called like a normal function, and change them. If you want to use some of the code in the report function as a subroutine, place it in a separate subroutine, and call it from the report function and other places.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1379 fires when a report function is invoked with a plain CALL statement instead of through
the reporting mechanism — per the official guidance, report functions must be executed via
START REPORT/FINISH REPORT/OUTPUT TO REPORT exclusively.
- A report function called directly with
CALL, per the official guidance — the direct, only cause.
Solutions / Resolution
- Use
OUTPUT TO REPORT(alongsideSTART REPORT/FINISH REPORT) instead of calling the report function directly, per the official guidance. - If shared logic needs to be called from both the report and elsewhere, extract it into a separate subroutine, per the official guidance, callable from both the report function and other program locations.
Examples
Calling a report function directly
CALL order_report(order_id, status)
-- -1379: order_report is a REPORT, not callable directly
Corrected
START REPORT order_report
OUTPUT TO REPORT order_report(order_id, status)
FINISH REPORT order_report
Diagnostic Checks
- Check whether the called routine is declared as a
REPORT, and if so, replace the directCALLwith theSTART REPORT/OUTPUT TO REPORT/FINISH REPORTsequence.
Related Errors / Related Topics
- -1335 — "A report is accepting output or being finished before it has been started." A related report-statement-ordering error, about the correct sequence once using the reporting mechanism properly.
A report function was called directly instead of through OUTPUT TO REPORT — use the proper
reporting statement sequence.