Embedded SQL applications use host variables to communicate values to and from the database. Host variables are C variables that are identified to the SQL preprocessor in a declaration section.
Define host variables by placing them within a declaration section. Host variables are declared by surrounding the normal C variable declarations with BEGIN DECLARE SECTION and END DECLARE SECTION statements.
To transfer information between a program and the database server, every data item must
have a data type. You can create a host variable with any one of the supported
types.
A host-variable declaration section can appear anywhere that C variables can normally be declared, including the parameter declaration section of a C function.
Indicator variables are C variables that hold supplementary information about a particular host variable. You can use a host variable when fetching or putting data. Use indicator variables to handle NULL values.