HP Integrity NonStop J-Series User Manual

Page 65

Advertising
background image

DEVELOPING A DATA BASE
Using DDL to Create a Record Description

-----------------------------------------------------------------
| |
| (8) Names a field, "vacation." The PIC clause identifies |
| the size (three characters) of this elementary field |
| and indicates its data type (numeric). The symbol "S" |
| in the PIC field indicates that the value for the field |
| can include a plus or minus sign. |
| |
| (9) Identifies a key field, "empnum." The absence of a key |
| specifier in this KEY clause indicates that "empnum" is |
| the primary key field. Since the "employee" file is |
| identified as a key-sequenced file, the RECORD |
| statement must identify a primary key field. |
| |
| (10) Identifies a key field, "empname." The presence of a |
| two character mnemonic (en) in the KEY clause indicates |
| that "empname" is an alternate key field. |
| |
| (11) Identifies a composite key field, "dept." A composite |
| key field is a key that consists of a group field. The |
| presence of the two-character mnemonic (dp) indicates |
| that "dept" is an alternate key field. |
| |
| (12) Terminates the RECORD statement. |
| |
| (13) Identifies the beginning of a new RECORD statement and |
| supplies the record description name "dependents." |
| |
| (14) Supplies a file name ("depend") and identifies the file |
| type (KEY-SEQUENCED). |
| |
| (15) Defines a group field ("dep-key"). |
| |
| (16) Defines a field named "relationship." The PIC clause |
| associated with this field indicates that its data type |
| is alphabetic and its size is one character. |
| |
| (17) Identifies "dep-key" as the primary key. Note that |
| since "dep-key" is a group field, this primary key is a |
| composite key. |
| |
| (18) Identifies "dependent-name" as an alternate key field. |
| |
-----------------------------------------------------------------

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

3-14

Advertising
This manual is related to the following products: