ENABLE Reference Manual

ENABLE ATTRIBUTES
TREE Attribute
Depending on the purpose of the application, any of the three
boxes could be at the first level of the tree structures. These
boxes could be at the first level because appropriate join fields
exist to link the boxes together. Because the main purpose of
the application is to display information about departments,
"depart-box" should be at the first level of the tree structure.
If the main purpose of the application were to display
information about employees, you would make "employ-box" the box
at the first level of the tree structure.
Having chosen "depart-box" as the box at the first level of the
tree structure, you must now choose a box (or boxes) to reside at
the second level of the tree structure. Since you cannot
establish a link between "depart-box" and "depends-box"
(appropriate join fields do not exist) but you can establish a
link between "depart-box" and "employ-box," "employ-box" is the
only box that can reside at the second level of the tree. It
then follows that "depends-box" must reside at the third level of
the tree structure.
To build the tree structure for this application, you set a value
for the TREE attribute as follows:
1. Identify "depart-box" as being at the first level of the tree
structure:
SET APPL TREE (02 depart-box
2. Identify "employ-box" as being at the second level of the
tree structure:
SET APPL TREE (02 depart-box
04 employ-box
3. Provide the LINK OPTIONAL that connects "employ-box" to
"depart-box":
LINK dept-no TO OPTIONAL dept-num
| |
| join field of "employ-box"
|
join field of "depart-box"
4. Include the LINK OPTIONAL with the part of the SET APPL TREE
command that identifies a level for "employ-box":
SET APPL TREE (02 depart-box
04 employ-box
LINK dept-no TO OPTIONAL dept-num
4-90