ENABLE Reference Manual
ENABLE ATTRIBUTES
TREE Attribute
What is a LINK? A link is the portion of a tree structure that
defines the logical connection between two boxes. While a tree
structure can contain multiple links that connect the same box to
several other boxes, a single link connects only two boxes.
To establish a link between two boxes in the tree structure, you
identify matching fields, called join fields, for both boxes.
When ENABLE generates an application, it includes program logic
that tells the application to use the data values in these join
fields to insert and read records for both boxes.
Figure 4-4 shows the records associated with two boxes:
"employee-box" and "depend-box." This figure also shows some
matching join field values in these records. In this figure, the
join fields are "empno" and "empnum."
S5043-021
empno empname
0001 Jon
0002 Anne
0003 Philip
0005 Steve
• • •
• • •
• • •
• • •
• • •
empnum depend-name
0001 Sue
0001 Joe
0002 Mark
0003 Mary
0004 Michael
• • •
• • •
• • •
• • •
• • •
• • •
Employee-box Records
Depend-box Records
Matching
Join Field
Values
Figure 4-4. Example of Matching Join Fields in Records
Because a tree is a hierarchical structure, the link provided by
ENABLE is a special link called a LINK OPTIONAL. When you
establish a LINK OPTIONAL for two boxes, you define the order in
which the application is to read or insert records for the boxes
as well as identifying the join fields for the boxes. For this
reason, a LINK OPTIONAL is an ordered link.
4-75