Informix Error -1148
-1148 Size of a window may not be negative.
The AT clause of this OPEN WINDOW statement uses a negative number. The row and column sizes must be positive integers. Revise the statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-1148 fires when OPEN WINDOW's AT clause contains a negative number — per the official
guidance, row and column values must be positive integers.
- A negative row or column value in the
ATclause, per the official guidance — the direct, only cause, likely from a computed value (an expression gone wrong) rather than a literal typo.
Solutions / Resolution
- Revise the statement so row and column are positive integers, per the official guidance.
- If the value is computed, check the expression for what produced a negative result.
Examples
A negative computed position
LET v_row = current_line - 30
OPEN WINDOW w1 AT v_row, 1 WITH FORM "order_entry"
-- -1148: v_row evaluated to a negative number
Corrected
LET v_row = 1
OPEN WINDOW w1 AT v_row, 1 WITH FORM "order_entry"
Diagnostic Checks
- Check the actual value of the row/column expression used in the
ATclause at the point of failure.
Related Errors / Related Topics
- -1144 — "Cannot open window. Window origin is not on the screen." A related
OPEN WINDOW ... ATerror, about an in-range but off-screen position rather than a negative value.
OPEN WINDOW's AT clause requires positive row/column values — check any computed expression
for how it produced a negative result.