Sign in

docs RPG Reference

Free-Form Enumeration Definition

Free-Form Enumeration Definition

Free-Form Enumeration Definition

An enumeration begins with the DCL-ENUM statement, followed by zero or more constant definition statements, followed by the END-ENUM statement.

A typed enumeration has one or more constant definition statements, and can be used to define fields and other items like the enumeration.

DCL-ENUM and END-ENUM are only available bas free-form statements, but the constant definitions can be either free-form or fixed-form.

The DCL-C operation code is optional for a free-form constant definition unless the constant name is the same as an operation code used in free-form calculations.

For more information about enumerations, see Enumerations and Typed Enumerations.