ASA Programming Guide
Embedded SQL Programming
Using host variables
Indicator variables
The following table provides a summary of indicator variable usage.
| Indicator Value | Supplying Value to database | Receiving value from database |
|---|---|---|
| > 0 | Host variable value | Retrieved value was truncated — actual length in indicator variable |
| 0 | Host variable value | Fetch successful, or CONVERSION_ERROR set to ON |
| -1 | NULL value | NULL result |
| -2 | NULL value | Conversion error (when CONVERSION_ERROR is set to OFF only). SQLCODE indicates a CANNOT_CONVERT warning |
| < -2 | NULL value | NULL result |
For more information on retrieving long values, see GET DATA statement [ESQL].