ENABLE Reference Manual

ENABLE ATTRIBUTES
TREE Attribute
• "employ-box," which represents a file that contains
information about employees
• "depends-box," which represents a file that contains
information about the dependents of employees
Figure 4-11 shows part of the record descriptions for these boxes
and also shows the partial contents of the files represented by
the boxes.
S5043-027
RECORD dependents
FILE IS depend ...
02 depent-key
04 empnum PIC 9(4)
04 dep-no PIC 9(2)
02 dep-name PIC X(20)
KEY 0 IS depent-key
KEY "dn" IS dep-name
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
Join Fields for
Depend-box and
Employ-box
Common Data Values:
empnum • • • dept-num
01 • • • 0001
02 • • • 0003
03 • • • 0003
07 • • • 0005
Partial Contents of File
Represented by Employ-Box
empnum • • •
0001 • • •
0001 • • •
0002 • • •
0006 • • •
0007 • • •
0007 • • •
0007 • • •
• • • • • •
Partial Contents of File
Represented by Depend-Box
Partial Contents of File
Represented by Depart-Box
dept-no • • • • • •
0001 • • •
0002 • • •
0003 • • •
0004 • • • • • •
0005 • • •
• • • • • • • • •
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
Common Data Values:
Join Fields for
Employ-box and
Depart-box
Figure 4-11. Sample Record Descriptions and File Contents
for Three Boxes
4-89