Data Definition Language (DDL) Reference Manual
Definitions and Records
Data Definition Language (DDL) Reference Manual—529431-004
5-18
Error Handling
DUPLICATES [ NOT ] ALLOWED
specifies whether to allow duplicate alternate key values. Do not specify
DUPLICATES ALLOWED for a primary key field.
Default: DUPLICATES ALLOWED
UPDATE [ NOT ] ALLOWED
specifies whether to allow updates for an alternate key file. This clause affects FUP
output generated for the alternate key.
Default: UPDATE ALLOWED
SEQUENCE IS [ ASCENDING | DESCENDING ] {group-name |field-name }
specifies that the file is to be sorted on a nonkey field or group by the application
program. Only one field or group in a record can be used for this purpose.
[ ASCENDING | DESCENDING ]
specifies the sort order.
Default: ASCENDING
{ group-name | field-name }
is the name of the sort field. If the name is not unique in the dictionary, the
name must be qualified to make it unique.
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; that is, the PICTURE for a key must be
either all Xs, all 9s (without a sign), or TYPE CHARACTER.
Key fields can overlap.
Error Handling
When the DDL compiler encounters an error in a RECORD statement, it continues
processing the statement to determine if there are other errors before processing the
next statement. The DDL compiler does not add the record to the dictionary, does not
write any FUP source for it, and does not write the record to any open language source
code files.