Informix Error -1351
-1351 The function (or report) name has already been defined. Function
and report cannot both have the same name.Each function (or report, which is similar to a function) must have a unique name within the program. You must change either this use or the prior one.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1351 fires when a function and a report (or two functions, or two reports) in the same program share a name — per the official guidance, each function or report must have a unique name throughout the program.
- A function and a report defined with the same name, per the official guidance — the direct, named cause.
- A name accidentally reused across separate source modules in a multimodule program, where the collision isn't obvious from any single file.
Solutions / Resolution
- Rename either the current definition or the previously declared one, per the official guidance, to eliminate the duplicate.
Examples
A function and report sharing a name
FUNCTION order_summary()
...
END FUNCTION
REPORT order_summary(p_order_id)
...
END REPORT
-- -1351: order_summary is defined as both a function and a report
Corrected
FUNCTION order_summary()
...
END FUNCTION
REPORT order_summary_report(p_order_id)
...
END REPORT
Diagnostic Checks
- Search the entire program (across all modules) for every function and report name, and confirm none collide.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1351 in this set yet.
A function and report (or two functions/reports) share the same name — rename one to eliminate the duplicate.