Enumeration definitions have been added to RPG as part of the Fall Technology Refreshes, IBM i 7.5 TR3 and 7.4 TR9. This allows me to define a list, or group, of constants in one definition structure. Personally I would only include related constants in one enumeration group, but I could include all of my constants, both related and unrelated, in one group.
The definition looks very similar to how to code a data structure definition.
01 dcl-enum EnumerationName ; 02 Name1 'Value 1' ; 03 Name2 'Value 2' ; 04 end-enum ; |



