Informix Error -33040: Object hostvar was not declared.
Cause and resolution
Object hostvar was not declared.
The host variable hostvar is either not declared, or it is misspelled. If hostvar is not declared as a host variable, declare it. Otherwise, correct the misspelling.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-33040 fires when a host variable is used but wasn't declared, or its name is misspelled — per the official guidance.
- A host variable referenced without a matching declaration, per the official guidance — the first named case.
- A misspelled host-variable name, per the official guidance — the second named case.
Solutions / Resolution
- If the variable isn't declared as a host variable, declare it, per the official guidance.
- Otherwise, correct the misspelling, per the official guidance.
Examples
N/A
No specific triggering statement is documented beyond an undeclared/misspelled host variable.
Diagnostic Checks
- Check the flagged host variable's name against the
BEGIN/END DECLARE SECTION, and either declare it or correct its spelling.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -33040 in this set yet.
A host variable was used without being declared, or was misspelled — declare it, or correct the spelling.