Figure 5-3. sample record descriptions 5-5 – HP Integrity NonStop J-Series User Manual
Page 89
![background image](/manuals/396723/89/background.png)
CREATING AND RUNNING A MULTIFILE APPLICATION
Do Matching Fields Exist?
SPECIAL CONSIDERATIONS FOR MULTIFILE APPLICATIONS_
Before you try to generate a multifile application, consider
the answers to the following questions:
1. Do the files contain matching fields?
2. Do the files contain related information?
Do Matching Fields Exist?
ENABLE can generate an application that uses several data base
files only if the record descriptions of the files contain
matching fields. Fields can match only when they have compatible
data types. Consider, for example, the record descriptions in
Figure 5-3 of the two data base files used by the sample
"employee-detail" application.
S5044-022
RECORD employee.
FILE IS employee KEY-SEQUENCED.
02 empnum PIC 9(4) HEADING "Employee Number"
02 empname PIC X(18) HEADING "Employee Name".
02 dept HEADING "Department".
04 regnum PIC 9(2) HEADING "Region Number".
04 branchnum PIC 9(2) HEADING "Branch Number".
02 job PIC X(12) HEADING "Job Title".
02 age PIC 9(2) HEADING "Age".
02 salary PIC 9(4)V99 HEADING "Salary".
02 vacation PIC S99 HEADING "Vacation".
KEY 0 IS empnum.
KEY "en" IS empname.
KEY "dp" IS dept.
END
RECORD dependents.
FILE IS depend KEY-SEQUENCED.
02 dep-key.
04 emp-no PIC 9(4) HEADING "Employee Number"
04 dependent-no PIC 9(2) HEADING "Dependent ID".
02 dependent-name PIC X(18) HEADING "Dependent Name".
02 relationship PIC A.
02 dependent-age PIC 9(2).
KEY 0 IS dep-key.
KEY "dn" IS dependent-name.
END
Figure 5-3. Sample Record Descriptions
5-5