Indicator variables in Fortran
An indicator variable is a 2-byte integer (INTEGER*2). You declare indicator variables in the same way as host variables. You can mix the declarations of the two types of variables.
The following diagram shows the syntax for declaring an indicator variable in Fortran.
.-,-----------------------------------------. V | >>-INTEGER*2----variable-name--+------------------------+-+---->< '-/--numeric-constant--/-'
Example
The following example shows a FETCH
statement with the declarations of the host variables that are needed
for the FETCH statement and their associated indicator variables.
EXEC SQL FETCH CLS_CURSOR INTO :CLSCD,
C :DAY :DAYIND,
C :BGN :BGNIND,
C :END :ENDIND
You can declare
these variables as follows: CHARACTER*7 CLSCD
INTEGER*2 DAY
CHARACTER*8 BGN, END
INTEGER*2 DAYIND, BGNIND, ENDIND
