Summary of indicator variable values

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 about retrieving long values, see GET DATA statement [ESQL].