DSNH314I E csectname LINE nnnn COL cc REFERENCE TO HOST VARIABLE name IS AMBIGUOUS
Explanation
The host variable name was
defined more than once in this application program. The precompiler
cannot distinguish which host variable definition should be used here.
The following table indicates some possible combinations. Db2 supports only a single adjacent
qualifier for a host variable name.
Case |
Ref |
Definition |
Result
|
Suggested
Change |
---|---|---|---|---|
1 | a | x.a | Valid | None |
2 | x.a | x.a, y.a | Valid | None |
3 | a | x.a, y.a | DSNH314I | Reference x.a or y.a |
4 | a | x.a, a | Valid | None |
5 | x.a | q.x.a, v.x.a | No precompiler error, but host language compiler will issue an error. | Variable name changes |
6 | a | a, a | No precompiler error, but host language compiler will issue an error. | Variable name changes |
System action
If the SQL statement is a declaration, it is discarded. If the containing SQL statement is executable, it is replaced by host language statements that will, if executed, set an error code in the SQLCA.
User response
Make the host variable name unique or use qualification to indicate which host variable definition is to be used, as suggested in the above table.
Severity
8 (error)