ENABLE Reference Manual

ENABLE ATTRIBUTES
INCLUDE Attribute
In the "zip" record description, "abc" is a composite alternate
key field made up of the elementary fields "a," "b," and "c." If
you add a box with the following commands:
SET BOX RECORD zip
SET BOX INCLUDE (aaa,c, a, b)
ADD BOX zipper
the fields for box "zipper" will appear on the screen displayed
by the application as:
* AAA _
ABC
C ____
+ A ____
B ____
Notice that a plus sign appears before the screen label for field
"A." This sign identifies the field that the application can use
as an alternate key. The application can use "A" as a key
because it is the first field of the composite key "ABC."
If the first field of a composite key is a group field and you
reorder that group field, the application uses the first
elementary field of that group as a key.
For example, consider the following record description:
RECORD zot.
FILE IS zot ...
02 ABC.
04 AA.
06 BBB PIC 9.
06 CCC PIC 9.
04 BB
06 DDD PIC X.
06 EEE PIC X.
...
KEY "ac" IS ABC.
END
In the "zot" record description, "abc" is a composite alternate
key field consisting of the following group fields: "aa" and
"bb." If you generate an application by including the following
commands:
SET BOX RECORD zot
SET BOX INCLUDE (ddd, bbb, ccc, eee)
ADD BOX zing
4-34