Indicator Data Types
An indicator type is a 2-byte integer type. There are three ways to use indicator types in an application:
• In a statement that retrieves data from Ingres, you can use an indicator type to determine if its associated host variable was assigned a null.
• In a statement that sets data to Ingres, you can use an indicator type to assign a null to the database column, form field, or table field column.
• In a statement that retrieves character data from Ingres, you can use the indicator type as a check that the associated host variable was large enough to hold the full length of the returned character string.
Embedded SQL/Pascal predefines the 2-byte integer type indicator. As with other types, you should not redefine the indicator type. This type definition is in the file that is included when preprocessing the Embedded SQL statement include sqlca. The type declaration syntax is:
type
Indicator = [word] -32768..32767;
Because the type definition is in the referenced include file, you can only declare variables of type indicator after you have issued include sqlca. This declaration does not preclude you from declaring indicator variables of other 2-byte integer types.