Informix Error -9001: Only columns of type CHARACTER may be subscripted or printed without trailing blanks.
Cause and resolution
Only columns of type CHARACTER may be subscripted or printed without trailing blanks.
Either you attempted to subscript or apply the CLIPPED function to a noncharacter variable, or you specified a variable to have the wrong data type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-9001 fires when a report specification subscripts a column/variable, or applies the CLIPPED function to one, that isn't of type CHARACTER — per the official guidance.
- Subscripting or applying CLIPPED to a noncharacter variable, per the official guidance — the first named cause.
- A variable declared with the wrong data type, per the official guidance — the second named cause.
Solutions / Resolution
- Only subscript or CLIPPED columns/variables of type CHARACTER, per the official guidance.
- Check the DEFINE section for the variable's declared type and correct it if wrong, per the official guidance.
Examples
Subscripting a noncharacter column
PRINT some_integer_col[1,3] -- -9001: some_integer_col isn't CHARACTER
Corrected
PRINT some_char_col[1,3]
Diagnostic Checks
- Check the DEFINE section for the column/variable's declared type, and correct any subscript or CLIPPED usage on a noncharacter value.
Related Errors / Related Topics
- -9060 — "The values m and n used to subscript name are outside the bounds for the column's defined length." A related column-subscripting error, on bounds rather than type.
Only CHARACTER columns/variables can be subscripted or CLIPPED — check the DEFINE section for the value's declared type.