ENABLE Reference Manual
ENABLE ATTRIBUTES
INCLUDE Attribute
• You must include any join fields for a box. (Refer to the
TREE attribute for an explanation of a join field.) If a join
field is a group field, you cannot reorder the items that make
up that group.
• If the value of the INSERT attribute is ON, you must include
the primary key of a key-sequenced file or a unique alternate
key for any file type.
Since ENABLE excludes any field that you do not list with the
INCLUDE attribute, you must include any field that cannot be
excluded when you supply a value for the EXCLUDE attribute.
Refer to the discussion of the SET EXCLUDE command for more
information about these fields.
Reordering the Elementary Items of a Group. If you use the
INCLUDE attribute to reorder the elementary items that make up a
composite key (a group field that is a primary or alternate key
field), the application cannot use the entire group item as a key
field. Instead, the application uses the first field (elementary
or group) that has not been reordered as a key.
If you do not include the first elementary field as part of the
composite key, the application does not use any part of the
composite key as a key. The application cannot use the group as
a key field because the user of the application would have no way
of knowing whether an element is the first, second, or third item
of the key field. (In other words, a READ GENERIC operation
could not be defined.)
Consider, for example, the following record description:
RECORD zip.
FILE IS ... KEY-SEQUENCED.
02 aaa PIC X.
02 abc.
04 a PIC X(4).
04 b PIC X(4).
04 c PIC X(4).
02 d.
04 ee PIC 9(4).
04 nn PIC 9(4).
KEY 0 IS aaa.
KEY "ab" IS abc.
END
4-33