Informix Error -1146: PROMPT message is too long to fit in the window.
Cause and resolution
PROMPT message is too long to fit in the window.
Although 4GL truncates the output of MESSAGE and COMMENT to fit the window dimensions, it does not do so for PROMPT and the user's response. Reduce the length of the prompt string, or make the window larger. You could display most of the prompting text with DISPLAY and then prompt with a single space or colon.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1146 fires when a PROMPT statement's message text is wider than the window it's displayed
in — per the official guidance, unlike MESSAGE and comment functions, 4GL doesn't automatically
truncate PROMPT text to fit.
- A
PROMPTmessage string longer than the window's width, per the official guidance — the direct, only cause, sincePROMPT(unlikeMESSAGE) isn't auto-truncated.
Solutions / Resolution
- Shorten the prompt text, per the official guidance.
- Expand the window size, per the official guidance, if a longer prompt is genuinely needed.
- Use
DISPLAYto show most of the text first, thenPROMPTwith minimal text (like a space or colon), per the official guidance's suggested pattern.
Examples
A prompt too long for the window
PROMPT "Please enter the complete order identification number to proceed: "
FOR v_order_id
-- -1146: the message text exceeds the window's width
Corrected — display the text, then prompt minimally
DISPLAY "Please enter the complete order identification number to proceed:"
AT 5, 1
PROMPT " " FOR v_order_id
Diagnostic Checks
- Measure the
PROMPTmessage's length against the window's actual width.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -1146 in this set yet.
PROMPT text isn't auto-truncated like MESSAGE — shorten it, widen the window, or split it
into a DISPLAY plus a minimal PROMPT.