Previous Topic: Format Names in RPG III

Next Topic: RPG III Subroutine and Label Names

RPG III Field Names

Program field names should follow the rules laid out in the naming convention.

The names of fields should, wherever possible, be the same as those in the file from which they are obtained. This helps to standardize the naming of fields, and also makes clearer the mapping of fields between files. If necessary, a different prefix can be used to indicate that the field is a work field or a device field: for example, JJCUCD could give P1CUCD, #1CUCD, and WWCUCD.

Note: Format identifier: ‘II’ is either the format identifier from a database or a device file or work prefix.

Note: Mnemonic: MMMM is a mnemonic constructed according to the rules given in the chapter on naming conventions.

For the names of fields which act as accumulators, use an appropriate prefix + the mnemonic of the field being accumulated. This helps to make mapping a field from format to format, clear.

There are some exceptions to the above rules: