Informix Error -4654: CHAR size should be in the range of 1 to 32766.
Cause and resolution
CHAR size should be in the range of 1 to 32766.
The program has declared a variable of type CHAR with a size that is out of the acceptable range.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4654 fires when a CHAR variable is declared with a size outside 1 to 32766 — per the
official guidance.
- A
CHARsize outside the 1-32766 range, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the
CHARsize to a value within 1 to 32766, per the official guidance.
Examples
An oversized CHAR declaration
DEFINE notes CHAR(50000)
-- -4654: exceeds the 32766 maximum
Corrected
DEFINE notes CHAR(32766)
Diagnostic Checks
- Check every
CHARdeclaration's size, and correct any outside the 1-32766 range.
Related Errors / Related Topics
- -4638 — "The maximum size for varchar must be between 1 and 255." The equivalent size
restriction for
VARCHAR, with a much smaller maximum.
A CHAR declaration's size is outside 1 to 32766 — correct it to fall within that range.