Informix Error -26028: Label label-name must be unique within an SPL procedure.
Cause and resolution
Label label-name must be unique within an SPL procedure.
The scope of the label-name is a procedure, so the label names must be unique between the CREATE [PROCEDURE|FUNCTION] and END [PROCEDURE|FUNCTION] keywords.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-26028 fires when the same label name is defined more than once in an SPL procedure — per the official guidance.
- A duplicate label name between the procedure's
CREATE/ENDkeywords, per the official guidance — the direct, only cause; a label's scope is the whole procedure, so names must be unique within it.
Solutions / Resolution
- Rename one of the duplicate labels, per the official guidance.
Examples
A duplicate label
CREATE PROCEDURE testproc()
<<lbl>> LOOP
...
END LOOP lbl;
<<lbl>> LOOP
...
END LOOP lbl;
-- -26028: 'lbl' defined twice in the same procedure
END PROCEDURE;
Diagnostic Checks
- Search the procedure for every label definition, and confirm no name is reused.
Related Errors / Related Topics
- -26027 — "Label label-name specified on a GOTO statement is not valid." A related label-validity error, on an undefined label rather than a duplicate one.
A label name was defined more than once in the same SPL procedure — rename one of the duplicates.