Informix Error -4414: The label label-name has been used but has never been defined within this function/report.
Cause and resolution
The label label-name has been used but has never been defined within this function/report.
A GOTO or WHENEVER statement refers to the label shown, but there is no corresponding LABEL statement in the current function, report, handler, or main program. Check the spelling of the label. If it is as you intended it, find and inspect the LABEL statement that should define it. You cannot transfer out of a program block with GOTO; labels must be defined in the same function body where they are used. Only NewEra returns this error.
-4414 The label label-name has been used but has never been defined within the above main program or function.
A GOTO or WHENEVER statement refers to the label shown, but there is no corresponding LABEL statement in the current function, report, handler, or main program. Check the spelling of the label. If it is as you intended it, find and inspect the LABEL statement that should define it. You cannot transfer out of a function with GOTO; labels must be defined in the same function body where they are used. Only 4GL returns this error.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4414 covers two variants of the same underlying condition — per the official guidance, a
GOTO or WHENEVER statement refers to a label with no corresponding LABEL statement in the
current function, report, handler, or main program; labels must be defined in the same
function body where they're used, and GOTO can't transfer out of a program block.
- A
GOTO/WHENEVERreferencing a label never defined in the same scope, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the spelling of the label, per the official guidance.
- If it's spelled as intended, find and inspect the
LABELstatement that should define it, per the official guidance, adding one if it's genuinely missing.
Examples
A GOTO to an undefined label
GOTO retry
-- -4414: "retry" was never defined with a LABEL statement here
Corrected
LABEL retry:
...
GOTO retry
Diagnostic Checks
- Check every
GOTO/WHENEVERtarget's spelling, and confirm a matchingLABELstatement exists in the same function/report/main program.
Related Errors / Related Topics
- -4413 — "The label label-name has already been defined within this function/report." The mirror-image error, about a label defined more than once rather than referenced but never defined.
A GOTO/WHENEVER references a label never defined in the same scope — check its spelling
and add the missing LABEL statement.