Informix Error -4022: The reserved keyword "name" cannot be used as a 4GL identifier.
Cause and resolution
The reserved keyword "name" cannot be used as a 4GL identifier.
Keywords cannot be used to name a function, report, variable, or constant. Consult the IBM Informix 4GL Language Reference for a list of reserved words.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4022 fires when a reserved keyword is used to name a function, report, variable, or constant — per the official guidance, keywords can't be reused as 4GL identifiers.
- A reserved keyword used as an identifier name, per the official guidance — the direct, only cause.
Solutions / Resolution
- Consult the IBM Informix 4GL Language Reference for the list of reserved words, per the official guidance, and choose a non-reserved name.
Examples
A reserved word used as a variable name
DEFINE type INTEGER
-- -4022: TYPE is a reserved 4GL keyword
Corrected
DEFINE item_type INTEGER
Diagnostic Checks
- Check any identifier that fails to compile against the IBM Informix 4GL reserved-word list, and rename it if it collides.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4022 in this set yet.
A reserved keyword was used as an identifier name — choose a non-reserved name instead.