Informix Error -26027: Label label-name specified on a GOTO statement is not valid.
Cause and resolution
Label label-name specified on a GOTO statement is not valid.
An undefined or invalid label is used with the GOTO statement. The GOTO label must be defined within the same procedure. Check the label-name for correct spelling.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26027 fires when an SPL GOTO statement names an undefined or invalid label — per the
official guidance.
- The
GOTOlabel isn't defined within the same procedure, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the label name's spelling, per the official guidance.
- Define the label within the same procedure, per the official guidance's implication, if it's genuinely missing.
Examples
A GOTO to an undefined label
CREATE PROCEDURE testproc()
GOTO done;
...
END PROCEDURE;
-- -26027: 'done' is never defined as a label in this procedure
Diagnostic Checks
- Check the
GOTOtarget's spelling, and confirm the label is defined within the same procedure.
Related Errors / Related Topics
- -26028 — "Label label-name must be unique within an SPL procedure." A related label-validity error, on duplicate labels rather than an undefined one.
- -26031 — "END LOOP label label-name doesn't not match with the LOOP label
label-name." A related label-validity error, specific to
LOOP/END LOOPpairing. - -26032 — "Invalid label label-name used with EXIT WHEN clause." A related
label-validity error, specific to
EXIT WHEN.
An SPL GOTO statement named an undefined label — check its spelling and confirm it's
defined in the same procedure.