HP Integrity NonStop J-Series User Manual

Page 63

Advertising
background image

DEVELOPING A DATA BASE
Using DDL to Create a Record Description

Consider Figure 3-9, which shows the DDL RECORD statements of the
two files in the sample data base. The numbers that appear to
the right of this figure refer to notes that describe different
portions of the RECORD statements.

-----------------------------------------------------------------
| |
|RECORD employee. (1) |
| FILE IS employee KEY-SEQUENCED. (2) |
| 02 empnum PIC 9(4) HEADING "Employee Number". (3) |
| 02 empname PIC X(18) HEADING "Employee Name". (4) |
| 02 dept HEADING "Department". (5) |
| 04 regnum PIC 9(4) HEADING "Region Number". (6) |
| 04 branchnum PIC 9(4) 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". (7) |
| 02 vacation PIC S99 HEADING "Vacation". (8) |
| KEY IS empnum. (9) |
| KEY "en" IS empname. (10) |
| KEY "dp" IS dept. (11) |
| END (12) |
| |
| RECORD dependents. (13) |
| FILE IS depend KEY-SEQUENCED. (14) |
| 02 dep-key. (15) |
| 04 emp-no PIC 9(4) HEADING "Employee Number". |
| 04 dependent-no PIC 9(2) HEADING "Dependent Number". |
| 02 dependent-name PIC X(18) HEADING "Dependent Name.". |
| 02 relationship PIC A. (16) |
| 02 dependent-age PIC 99. |
| KEY 0 IS dep-key. (17) |
| KEY "dn" IS dependent-name. (18) |
| END |
|_______________________________________________________________|
| |
| |
| NOTES |
| |
| (1) Identifies the subsequent information as a RECORD |
| statement and supplies the record description name |
| "employee." |
| |
-----------------------------------------------------------------

Figure 3-9. Sample DDL RECORD Statements (Continued next page)

3-12

Advertising
This manual is related to the following products: