Indicator variables
When an SQL statement returns a value, it returns it in the host variable for the specified column. In some cases, you can associate an indicator variable with the host variable to obtain additional information about the value that is returned. If you specify an indicator variable, Informix® ESQL/C sets it in addition to returning the value to the host variable.
The indicator variable provides additional information in the following
situations:
- If the host variable is associated with a database column or an aggregate function that allows null values, the indicator variable can specify whether the value is null.
- If the host variable is a character array and the column value is truncated by the transfer, the indicator variable can specify the size of the returned value.
The following topics describe how to declare an indicator variable and associate it with a host variable, and also how Informix® ESQL/C sets an indicator variable to specify the two preceding conditions.