Definitions and Records
Data Definition Language (DDL) Reference Manual — 426798-002
5- 25
Key Assignment Syntax
Key Assignment Guidelines
The following points are guidelines for making key assignments:
•
Only key-sequenced records can have a key-specifier with a value of 0, indicating
a primary key. Key-sequenced records must have one and only one primary key.
•
A key defined with a nonzero key specifier, such as “NM” or 32000, is an
alternate key.
•
Unstructured file records cannot have alternate keys.
•
For COBOL, keys must be alphanumeric. For COBOL, this is a picture of all X’s, a
picture of all 9’s (without a sign), or TYPE CHARACTER.
•
DDL ignores any key assignment specifications when generating TACL source
code from a RECORD statement.
RECORD Statement Examples
The RECORD statement examples refer to the following DEFINITION statements, and
the first DEFINITION statement refers to the following CONSTANT statements:
CONSTANT phone-heading VALUE IS "Phone Number".
CONSTANT phone-display VALUE IS "M<(999) 999-9999>".
DEF phone HEADING phone-heading
DISPLAY phone-display .
02 area-code PIC 9(3) .
02 prefix PIC 9(3) .
02 numb PIC 9(4) .
END
DEF addr .
02 address PIC X(22) .
02 city PIC X(14) .
02 state PIC X(12) .
END
DEF custinfo .
02 custnum PIC 9(4) .
02 custname PIC X(18) .
02 addr TYPE * .
END
Содержание DDL D40
Страница 36: ...Introduction to DDL Data Definition Language DDL Reference Manual 426798 002 1 14 Examining a Dictionary ...
Страница 66: ...Named Constants Data Definition Language DDL Reference Manual 426798 002 4 10 Standard SPI Constants ...
Страница 230: ...Dictionary Manipulation Statements Data Definition Language DDL Reference Manual 426798 002 8 14 SHOW USE OF Statement ...
Страница 370: ...Dictionary Maintenance Data Definition Language DDL Reference Manual 426798 002 10 24 Converting a Dictionary ...
Страница 456: ...Sample Schemas Data Definition Language DDL Reference Manual 426798 002 B 12 ASSNDDL Statements ...
Страница 470: ...DDL Data Translation Data Definition Language DDL Reference Manual 426798 002 C 14 ...
Страница 528: ...Dictionary Reports Data Definition Language DDL Reference Manual 426798 002 E 8 Requesting Reports ...
Страница 552: ...DDL Alignment Rules Data Definition Language DDL Reference Manual 426798 002 H 4 FIELDALIGN_SHARED8 Alignment Rules ...
Страница 576: ...Index Data Definition Language DDL Reference Manual 426798 002 Index 22 Special Characters ...