HP Integrity NonStop J-Series User Manual

Page 241

Advertising
background image

Sample Project-Tracking System
Creating a Dictionary That Describes the Files

Creating a Dictionary That Describes the Files

Once you identify the files to be used by the system, you are
ready to create a data dictionary that describes them. Figure
12-9 shows the DDL source code that creates the data dictionary
for the project-tracking files.

-----------------------------------------------------------------
| |
| RECORD projects. |
| FILE IS projects KEY-SEQUENCED. |
| 02 proj-code PIC 9(6) HEADING "Project Code". |
| 02 proj-desc PIC X(20) HEADING "Project Name". |
| 02 proj-status PIC X(5) HEADING "Project Status". |
| 02 proj-start-date HEADING "Starting Date". |
| 04 start-day PIC 99 HEADING "Day". |
| 04 start-mo PIC 99 HEADING "Month". |
| 04 start-yr PIC 99 HEADING "Year". |
| 02 proj-end-date HEADING "Ending Date". |
| 04 end-day PIC 99 HEADING "Day". |
| 04 end-mo PIC 99 HEADING "Month". |
| 04 end-yr PIC 99 HEADING "Year". |
| 02 proj-mgr PIC 9(6) HEADING "Manager". |
| KEY 0 IS proj-code. |
| KEY "pd" IS proj-desc. |
| KEY "pm" IS proj-mgr. |
| END |
| |
| RECORD employees. |
| FILE IS employs KEY-SEQUENCED. |
| 02 emp-no PIC 9(6) HEADING "Emp ID.". |
| 02 emp-name PIC X(30) HEADING "Employee Name". |
| 02 emp-dept PIC 9(4) HEADING "Dept.". |
| KEY 0 IS emp-no. |
| KEY "en" IS emp-name. |
| KEY "ed" IS emp-dept. |
| END |
| |
-----------------------------------------------------------------

Figure 12-9. DDL Source Code (Continued next page)

12-13

Advertising
This manual is related to the following products: