ENABLE Reference Manual
ENABLE ATTRIBUTES
TREE Attribute
Suppose, for example, that you want to generate an application
that displays information about departments and the employees
that belong to those departments. This application must use two
boxes:
• "depart-box," which represents the file that stores department
information
• "employ-box," which represents the file that stores employee
information
Figure 4-8 shows a portion of the record descriptions associated
with these boxes and the partial contents of the files that the
boxes represent.
S5043-024
RECORD employee
FILE IS employee ...
02 empnum PIC 9(4)
02 empname ...
02 dept-num PIC 9(6)
KEY 0 IS empnum
KEY "dn" IS dept-num
END
RECORD department
FILE IS depart ...
02 dept-no PIC 9(6)
02 dept-name ...
02 dept-loc ...
KEY 0 IS dept-no
KEY "dp" IS dept-name
END
Partial Contents of File
Represented by Depart-Box
dept-no • • • • • •
0001 • • • • • •
0002 • • • • • •
0003 • • • • • •
0004 • • • • • •
0005 • • • • • •
• • • • • • • • •
empno • • • dept-num
01 • • • 0001
02 • • • 0003
03 • • • 0003
07 • • • 0005
Partial Contents of File
Represented by Employee-Box
Join Fields Match in Data Type:
Common Data Values:
Figure 4-8. Sample Record Descriptions and File Contents
for Two Boxes
4-85