Informix Error -26031: END LOOP label label-name doesn't not match with the LOOP label label-na me.
Cause and resolution
END LOOP label label-name doesn't not match with the LOOP label label-na me.
The LOOP lable-name and END LOOP label-name do not match. Check the label-names for correct spelling.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26031 fires when a LOOP statement's label doesn't match its END LOOP statement's
label — per the official guidance.
- The
LOOPlabel-name and itsEND LOOPlabel-name don't match, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the label names for correct spelling, per the official guidance, and make
the
LOOP/END LOOPlabels match.
Examples
A mismatched LOOP/END LOOP label
<<outer>> LOOP
...
END LOOP inner;
-- -26031: 'outer' at LOOP doesn't match 'inner' at END LOOP
Corrected
<<outer>> LOOP
...
END LOOP outer;
Diagnostic Checks
- Compare every
LOOP's label against its matchingEND LOOP's label, and correct any mismatch.
Related Errors / Related Topics
- -26027 — "Label label-name specified on a GOTO statement is not valid." A related
label-validity error, on
GOTOrather thanLOOP/END LOOPpairing. - -26028 — "Label label-name must be unique within an SPL procedure." A related
label-validity error, on duplicate labels rather than a
LOOP/END LOOPmismatch.
A LOOP's label didn't match its END LOOP's label — check the spelling of both.