Informix Error -22282: Invalid numeric data length.
Cause and resolution
Invalid numeric data length.
The length and precision of the data is too large or otherwise incorrect. The length cannot be greater than 18, and the precision cannot be greater than the length.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-22282 fires when a numeric data item's length and/or precision is invalid — per the official guidance, the length can't exceed 18, and the precision can't exceed the length.
- A numeric data item with a length greater than 18, per the official guidance — the first named case.
- A numeric data item whose precision exceeds its length, per the official guidance — the second named case.
Solutions / Resolution
- Reduce the numeric data item's length to 18 or fewer digits, per the official guidance.
- Confirm the precision doesn't exceed the length, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an out-of-range length/precision.
Diagnostic Checks
- Check the flagged numeric item's declared length and precision, and correct them to satisfy length ≤ 18 and precision ≤ length.
Related Errors / Related Topics
- -22283 — "Numeric value from database cannot be stored in COBOL data item." A related numeric-storage error, on a specific value not fitting the declared item at runtime, rather than the declaration itself being invalid.
A numeric data item's length or precision was invalid (length > 18, or precision > length) — correct the declaration.