Informix Error -4390: Only one BEFORE MENU clause is allowed for each MENU statement.
Cause and resolution
Only one BEFORE MENU clause is allowed for each MENU statement.
There can be only one BEFORE block of statements in a MENU. Make sure that the scope of your MENU statements are correctly marked with an END MENU. Then combine all the preparation code for this menu into a single BEFORE MENU block. This error is returned only by 4GL at Version 4.1.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4390 fires when a MENU statement has more than one BEFORE MENU block — per the official
guidance, only one BEFORE block is allowed per menu; this error is returned only by 4GL at
Version 4.1.
- More than one
BEFORE MENUblock in the sameMENUstatement, per the official guidance — the direct, only cause. - A
MENUstatement's scope not correctly marked withEND MENU, per the official guidance — a related possible cause, causing two menus to be combined.
Solutions / Resolution
- Make sure every
MENUstatement's scope is correctly marked withEND MENU, per the official guidance. - Combine all preparation code for this menu into a single
BEFORE MENUblock, per the official guidance.
Examples
Duplicate BEFORE MENU blocks
MENU "Options"
BEFORE MENU
SHOW OPTION 1
BEFORE MENU
SHOW OPTION 2
-- -4390: only one BEFORE MENU block is allowed
END MENU
Corrected
MENU "Options"
BEFORE MENU
SHOW OPTION 1
SHOW OPTION 2
END MENU
Diagnostic Checks
- Check every
MENUstatement for more than oneBEFORE MENUblock, and check for a missingEND MENUcombining two menus together.
Related Errors / Related Topics
- -4396 — "The MENU declaration at line line-number is not terminated." A related
MENU-structure error, about a missingEND MENUentirely rather than a duplicateBEFORE MENUblock.
A MENU statement has more than one BEFORE MENU block — combine them, checking for a
missing END MENU first.