Informix Error -4052: Identifier "name" is not defined in the global scope.
Cause and resolution
Identifier "name" is not defined in the global scope.
A constant or variable is used that is not locally defined, so the compiler assumes that it is to be globally defined but does not find it there either.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4052 fires when a constant or variable is used that isn't locally defined, and the compiler's fallback assumption that it must be globally defined also fails to find it — per the official guidance, the identifier exists in neither scope.
- A constant or variable referenced without a local definition, and no global definition either, per the official guidance — the direct, only cause.
Solutions / Resolution
- Define the identifier locally, or check the spelling against its intended global definition and confirm the file declaring it globally has been included.
Examples
Referencing an undefined identifier
LET x = max_retries
-- -4052: max_retries isn't defined locally or globally
Corrected
DEFINE max_retries INTEGER
LET max_retries = 3
LET x = max_retries
Diagnostic Checks
- Check whether the identifier is defined locally, and if not, whether it's genuinely defined at module (global) scope and that scope's file is included.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4052 in this set yet.
An identifier isn't defined locally or globally — define it, or check its spelling against an existing definition.