ILE RPG Language Reference
Specifying Subfield Length
The length of a subfield may be specified using absolute (positional)
or length notation, or its length may be implied.
- Absolute
- Specify a value in both the From-Position (positions 26 through
32) and the To-Position/Length (positions 33 through 39) entries on
the definition specification.
- Length
- Specify a value in the To-Position/Length (positions 33 through
39) entry. The From-Position entry is blank.
- Implied Length
- If a subfield appears in the first parameter of one or more OVERLAY keywords, the subfield can be defined
without specifying any type or length information. In this case, the
type is character and the length is determined by the overlaid subfields.
In
addition, some data types, such as Pointers, Dates, Times and Timestamps
have a fixed length. For these types, the length is implied, although
it can be specified.
When using length notation, the subfield is positioned such that
its starting position is greater than the maximum To-Position of all
previously defined subfields. For examples of each notation, see Data Structure Examples.
[ Top of Page | Previous Page | Next Page | Contents |
Index ]