Informix Error -4138: Arrays of CHAR(*) are not allowed.
Cause and resolution
Arrays of CHAR(*) are not allowed.
ARRAY [ ] OF CHAR(*) is not a valid type.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4138 fires when a type declaration uses ARRAY [ ] OF CHAR(*) — per the official guidance,
this isn't a valid type.
- An array declared with element type
CHAR(*), per the official guidance — the direct, only cause.
Solutions / Resolution
- Declare the array's element type with an explicit
CHARlength, instead ofCHAR(*).
Examples
An array of CHAR(*)
DEFINE names ARRAY[10] OF CHAR(*)
-- -4138: CHAR(*) cannot be used as an array element type
Corrected
DEFINE names ARRAY[10] OF CHAR(30)
Diagnostic Checks
- Check every array declaration for a
CHAR(*)element type, and give it an explicit length instead.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4138 in this set yet.
An array's element type is declared CHAR(*), which isn't valid — give it an explicit length.