Informix Error -4330
-4330 Values cannot be RETURNed from the MAIN program.
Although RETURN is equivalent to EXIT PROGRAM in a MAIN program, it cannot include a value to be returned. NewEra programs return this error.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4330 fires when a RETURN statement in the MAIN program includes a value — per the
official guidance, RETURN is equivalent to EXIT PROGRAM in MAIN, but it can't include a
returned value; NewEra programs return this error.
- A
RETURNstatement inMAINthat includes a value, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the value from the
RETURNstatement, or useEXIT PROGRAMinstead.
Examples
A RETURN with a value in MAIN
MAIN
...
RETURN 0
-- -4330: MAIN cannot return a value
END MAIN
Corrected
MAIN
...
EXIT PROGRAM
END MAIN
Diagnostic Checks
- Check every
RETURNstatement inMAIN, and remove any value, or useEXIT PROGRAMinstead.
Related Errors / Related Topics
- -4067 — "This RETURN statement must provide a value." A related
RETURN-statement rule for ordinary functions, the opposite restriction of thisMAIN-specific case.
RETURN in MAIN includes a value, which isn't allowed — remove it, or use EXIT PROGRAM.