Contents Index Host variable usage Using indicator variables to handle NULL

ASA Programming Guide
  Embedded SQL Programming
    Using host variables

Indicator variables


Indicator variables are C variables that hold supplementary information when you are fetching or putting data. There are several distinct uses for indicator variables:

An indicator variable is a host variable of type short int that is placed immediately following a regular host variable in a SQL statement. For example, in the following INSERT statement, :ind_phone is an indicator variable:

EXEC SQL INSERT INTO Employee
   VALUES (:employee_number, :employee_name,
   :employee_initials, :employee_phone:ind_phone );

Using indicator variables to handle NULL
Using indicator variables for truncated values
Using indicator values for conversion errors
Summary of indicator variable values

Contents Index Host variable usage Using indicator variables to handle NULL