Informix Error -8108: A user variable or parameter must have a length which is greater than zero.
Cause and resolution
A user variable or parameter must have a length which is greater than zero.
Make sure that every CHAR and VARCHAR field in the DEFINE section has a nonzero length specification.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8108 fires when a CHAR/VARCHAR field in the DEFINE section has a zero length — per the
official guidance.
- A
CHAR/VARCHARfield declared with zero length, per the official guidance — the direct, only cause.
Solutions / Resolution
- Make sure every
CHARandVARCHARfield in theDEFINEsection has a nonzero length specification, per the official guidance.
Examples
A zero-length CHAR field
DEFINE
VARIABLE
status CHAR(0)
-- -8108: length must be greater than zero
Corrected
DEFINE
VARIABLE
status CHAR(10)
Diagnostic Checks
- Check every
CHAR/VARCHARfield in theDEFINEsection, and confirm its length is greater than zero.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -8108 in this set yet.
A CHAR/VARCHAR field has a zero length — give it a nonzero length.