Informix Error -19840: Invalid session environment variable.
Cause and resolution
Invalid session environment variable.
The identifier cannot be set in a session using the SET ENVIRONMENT command.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-19840 fires when SET ENVIRONMENT names an identifier that isn't a valid session
environment variable — per the official guidance.
- An identifier not settable via
SET ENVIRONMENT, per the official guidance — the direct, only cause.
Solutions / Resolution
- Check the identifier against the documented list of
SET ENVIRONMENTvariables, per the official guidance, and correct it.
Examples
An unsupported SET ENVIRONMENT variable
SET ENVIRONMENT NOT_A_REAL_VAR '1';
Diagnostic Checks
- Check the variable name's spelling against the documented
SET ENVIRONMENTlist.
Related Errors / Related Topics
- -19847 — "Incorrect session optimization environment variable." The same
unsupported-identifier condition, for
SET OPTIMIZATION ENVIRONMENTrather thanSET ENVIRONMENT.
The identifier isn't a valid SET ENVIRONMENT variable — check its spelling.