Using indicator variables in RPG/400 applications that use SQL

An indicator variable is a two-byte integer.

See the entry for the SMALLINT SQL data type in Table 1.

An indicator structure can be defined by declaring the variable as an array with an element length of 4,0 and declaring the array name as a subfield of a data structure with B in position 43.

Indicator variables are declared in the same way as host variables and the declarations of the two can be mixed in any way that seems appropriate to the programmer.