Informix Error -4458: Each dimension for an array must be between 1 and 32767, inclusive.
Cause and resolution
Each dimension for an array must be between 1 and 32767, inclusive.
Array dimensions cannot be less than one or greater than 32,767. If you need a larger array, you must either split the array into multiple arrays, or use multiple dimensions.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4458 fires when an array dimension is declared outside the range 1 to 32,767 — per the official guidance, this is a hard limit on each dimension's size.
- An array dimension declared as 0, negative, or greater than 32,767, per the official guidance — the direct, only cause.
Solutions / Resolution
- Split the array into multiple arrays, or use multiple dimensions, per the official guidance, if a larger effective size is needed.
Examples
An oversized single dimension
DEFINE big_array ARRAY[50000] OF INTEGER
-- -4458: 50000 exceeds the 32,767 maximum for one dimension
Corrected
DEFINE big_array ARRAY[200,250] OF INTEGER
-- 200*250 = 50,000 total elements, using two dimensions
Diagnostic Checks
- Check every array dimension, and confirm it's between 1 and 32,767, splitting into multiple dimensions/arrays if a larger size is needed.
Related Errors / Related Topics
- -4321 — "An array may have the maximum of three dimensions." A related array-declaration limit, about the number of dimensions rather than each dimension's size.
An array dimension is outside the 1-32,767 range — split into multiple dimensions or arrays.