Informix Error -22208: Host variables may not be USAGE INDEX.
Cause and resolution
Host variables may not be USAGE INDEX.
Change the USAGE clause for the host variable so that it is not USAGE IS INDEX and try again. IBM Informix ESQL/COBOL does not support USAGE INDEX.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-22208 fires when a host variable is declared USAGE IS INDEX — per the official
guidance, IBM Informix ESQL/COBOL doesn't support USAGE INDEX for host variables.
- A host variable declared
USAGE IS INDEX, per the official guidance — the direct, only cause.
Solutions / Resolution
- Change the host variable's
USAGEclause so it isn'tUSAGE IS INDEX, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond a host variable declared USAGE IS INDEX.
Diagnostic Checks
- Check the flagged host variable's
USAGEclause, and change it away fromINDEX.
Related Errors / Related Topics
- -22274 — "Host variables may not be USAGE POINTER." The same class of
unsupported-
USAGErestriction, forPOINTERrather thanINDEX.
A host variable was declared USAGE IS INDEX, which isn't supported — change its USAGE
clause.