Definition Attributes
Data Definition Language (DDL) Reference Manual — 426798-002
6- 89
89 Enumeration Clause
The next example associates the names of enumeration values with condition names:
DEF prts-ddl-object-type TYPE ENUM BEGIN AS "Miscellaneous".
88 bolt VALUE prts-enm-bolt.
88 nut VALUE prts-enm-nut.
88 pin VALUE prts-enm-pin.
88 screw VALUE prts-enm-screw.
88 washer VALUE prts-enm-washer.
89 prts-enm-bolt VALUE IS prts-obj-bolt AS "Bolt".
89 prts-enm-nut VALUE IS prts-obj-nut AS "Nut".
89 prts-enm-pin VALUE IS prts-obj-pin AS "Pin".
89 prts-enm-screw VALUE IS prts-obj-screw AS "Screw".
89 prts-enm-washer VALUE IS prts-obj-washer AS "Washer".
END.
89 Enumeration Clause
A level 89 enumeration clause associates a name with an enumeration value and,
optionally, specifies a display string for the value. You can use an enumeration clause
only for a field of type ENUM.
value-name
is a name that uniquely identifies the enumeration value.
VALUE { value | constant-name }
specifies a value to associate with
value-name
. If the first enumeration clause
does not include a value, the value is 0. The value for any subsequent
enumeration clause that does not include a value is 1 more than the previous
value. Enumeration clauses for the same field cannot specify the same value.
value
is a number from -32,768 to 32,767.
constant-name
is the name of a constant in the open DDL dictionary. The constant value must
be a number from -32,768 to 32,767.
AS { "display-string" | constant-name }
specifies a display string that represents the value. The default display string is the
enumeration name.
display-string
is a string of alphanumeric characters.
89 value-name [ VALUE { value | constant-name } ]
[ AS { "display-string" | constant-name } [ LN clause ] }