The SQL RPG/400® precompiler attempts to use the structure
parameter passing technique, if possible.
The precompiler generates code where each host variable is a separate
parameter when the following conditions are true:
- The data length of the host variables, referred to in the statement, is
greater than 9935. Because SQL uses 64 bytes of the structure, 9935 + 64 =
9999, the maximum length of a data structure.
- An indicator is specified on the statement where the length of the indexed
indicator name plus the required index value is greater than six characters.
The precompiler must generate an assignment statement for the indicator with
the indicator name in the result field that is limited to six characters ("INDIC,1"
requires seven characters).
- The length of a host variable is greater than 256. This can happen when
a data structure without subfields is used as a host variable, and its length
exceeds 256. Subfields cannot be defined with a length greater than 256.