ENABLE User's Guide
 CREATING AND RUNNING A MULTIFILE APPLICATION
 Do the Files Contain Related Information?
 Notice that the "empnum" field of the "employee" record
 description matches the "emp-no" field of the "dependents" record
 description. In this case both fields have the same data type:
 PIC 9 or numeric. If you are not sure that two fields have
 compatible data types, refer to the ENABLE Reference Manual for
 more information.
 When fields from two files match, you can use them as join fields
 to establish a logical connection between the two files. When
 you generate a multifile application, each file must have at
 least one join field that can be used to link it to another file.
 If an application accesses more than two data base files, some
 files may have more than one join field forming links to other
 files.
 ENABLE has one other requirement for multifile applications:
 when you link two files, the join field of one of the files must
 be a key field. In Figure 5-3, both of the prospective join
 fields ("empnum" and "emp-no") are key fields. "Empnum" is a
 primary key field and "emp-no" is the leading portion of a group
 field ("dep-key") that is also a primary key field.
 If your files do not have appropriate join fields, you cannot use
 ENABLE to generate an application to maintain them.
 Do the Files Contain Related Information?
 When you generate a multifile application, the files being
 accessed should contain related information.
 An ENABLE application uses the join-field value of one file to
 locate or insert a record in another file. If the join fields
 do not contain related information, the application might not
 perform in the manner you expect, even though the values in the
 join fields are compatible.
 Suppose, for example, that you try to generate an application to
 access a file that contains employee information and a file that
 contains parts information. Suppose further that the join fields
 of these files are: "enpnum" (containing a four-digit employee
 number) and "partnum" (containing a four-digit part number).
 Although ENABLE could generate this application, you could not
 use it in any meaningful manner because no logical relationship
 exists between employee numbers and part numbers.
 When your data base files do not contain related information,
 consider using several single-file applications to access the
 files.
 5-6










