Informix Error -4314
-4314 The program cannot continue or exit a menu at this point because
it is not within a MENU statement.This CONTINUE or EXIT statement uses the MENU keyword, but it is not located within a COMMAND section of a MENU statement. Either the statement is in error, or some other error has prevented 4GL from recognizing the MENU statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4314 fires when CONTINUE MENU or EXIT MENU appears outside a MENU statement's COMMAND
section — per the official guidance, either the statement is misplaced, or some other error
prevented 4GL from recognizing the enclosing MENU statement.
CONTINUE MENU/EXIT MENUused outside aMENUstatement'sCOMMANDsection, per the official guidance — the direct cause.- A separate error prevented the enclosing
MENUstatement from being recognized, per the official guidance — a related possible cause.
Solutions / Resolution
- Move the
CONTINUE MENU/EXIT MENUstatement inside aMENUstatement'sCOMMANDsection, or - Check for other errors preventing the
MENUstatement from being recognized, per the official guidance.
Examples
EXIT MENU outside a MENU statement
FUNCTION cancel()
EXIT MENU
-- -4314: not inside a MENU statement's COMMAND section
END FUNCTION
Corrected
MENU "Options"
COMMAND "Cancel"
EXIT MENU
END MENU
Diagnostic Checks
- Check whether the
CONTINUE MENU/EXIT MENUstatement is inside aMENUstatement'sCOMMANDsection, and check for other errors affecting the enclosingMENUstatement if it should be.
Related Errors / Related Topics
- -4315 — "The program cannot exit a FOREACH statement at this point because it is not
within a FOREACH statement." The same pattern applied to
FOREACHinstead ofMENU.
CONTINUE MENU/EXIT MENU is used outside a MENU statement — move it inside, or check for
errors affecting the MENU statement's recognition.