To facilitate use of indicator variables with host structures for output, PP2 accepts the definition of an array of small integers. For example:
INTO :STRUCTURE1 :INDVAR
WHERE col1 = :hostvar2;
INTO :STRUCTURE1 :INDVAR;
In both examples, INDVAR is associated with FIELD1, INDVAR with FIELD2 and so forth. The host variable is not required to have an associated indicator variable. The INDVAR array above could have less than four elements. However, PP2 associates host variables and indicator variables one to one in order of occurrence.
If there were two elements defined for the indicator variables in these examples, FIELD1 and FIELD2 would have associated indicators; FIELD3 and FIELD4 would not.
Indicator arrays can be associated only with a structure. Use of an array with individual elements results in a PP2 error.