Informix Error -1138
-1138 Border does not fit on screen. Window is too large.
The window that this OPEN WINDOW statement describes cannot be opened because its border does not fit on the screen. Despite the wording of the message, the window is not necessarily too large for the screen. However, one or more of its borders (top, bottom, left, or right) cannot be drawn. The position of the window is set in the OPEN WINDOWS statement; check that it starts no higher than row 2 and no farther left than column 2 (or else remove the BORDER attribute). The OPEN WINDOW statement or the form that it names sets the size of the window.
The dimensions of the terminal for UNIX systems are determined when the program starts by reading termcap information (or terminfo information, depending on the value of the INFORMIXTERM environment variable). If the termcap entry includes sg#1 (terminfo: xmc#1), 4GL reserves an additional column to the left and right of a bordered window. On DOS systems, the window size is always 24 lines by 80 characters.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1138 fires when OPEN WINDOW's BORDER attribute can't be drawn within the screen's
boundaries — per the official guidance, despite the message wording, the actual issue is
typically that one or more borders (top, bottom, left, right) extend past the displayable area,
not necessarily the window's overall size.
- A window positioned starting above row 2 or left of column 2 while using
BORDER, per the official guidance — bordered windows need that minimum margin for the border itself. - A terminal reserving extra columns per side for bordered windows (systems with
sg#1, orxmc#1in terminfo), per the official guidance — reducing the effectively usable area further than the raw terminal dimensions suggest. - DOS's fixed 24x80 dimensions leaving less room than expected once a border is added, per the official guidance.
Solutions / Resolution
- Ensure the window starts no higher than row 2 and no farther left than column 2 when using
BORDER, per the official guidance. - Check for terminal types that reserve extra columns per side for bordered windows, per the official guidance, and account for that reduced usable area.
- Reduce the window's size or remove the border, if the terminal's actual dimensions can't accommodate both the requested size and its border.
Examples
A bordered window starting too close to the edge
OPEN WINDOW w1 AT 1, 1 WITH FORM "order_entry"
ATTRIBUTE(BORDER)
-- -1138: BORDER needs the window to start at row 2, column 2 or later
Corrected
OPEN WINDOW w1 AT 2, 2 WITH FORM "order_entry"
ATTRIBUTE(BORDER)
Diagnostic Checks
- Check the window's starting row/column against the row-2/column-2 minimum required for
BORDER. - Check the terminal type for extra column reservations (
sg#1/xmc#1) that further reduce usable space.
Related Errors / Related Topics
- -1135 — "The row or column number in DISPLAY AT exceeds the limits of your terminal." A
related terminal-boundary error, about a
DISPLAY ... ATposition rather than a window border. - -1136 — "Window is too large to fit on the screen." A related window-size error, about overall dimensions rather than border placement specifically.
- -1137 — "Cannot open window." A related window error, about insufficient memory rather than screen boundaries.
A bordered window's edges don't fit within the terminal's displayable area — start it no higher than row 2, column 2, and account for terminal types that reserve extra border columns.