Field design
Indexing Fields
Representational Attributed
Field Constraints
Automatic Fields
Combining Attributes
Combining attributes
When deciding on combinations of field attributes, use the chart in Combining attributes to see if the combination you want to use is valid, See Key to table for combining attributes.
Attribute | KEY | OCH | ONM | FRV | UNQ | NR | DEF | LVL | ONE | INV | STR | FLT | BIN | COD | FV | OCC | LEN | PAD | UPD | BLOB | CLOB |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
KEY | |||||||||||||||||||||
ORD CHAR (OCH) | N | N | N | ||||||||||||||||||
ORD NUM (ONM) | N | N | N | ||||||||||||||||||
FRV | R | N | N | N | |||||||||||||||||
UNIQUE (UNQ) | @ | @ | N | N | |||||||||||||||||
NUM RANGE (NR) | N | N | =1 | ||||||||||||||||||
DEFERRABLE (DEF) | @ | @ | @ | N | @ | ||||||||||||||||
LEVEL (LVL) | |||||||||||||||||||||
AT-MOST-ONE (ONE) | N | ||||||||||||||||||||
INVISIBLE (INV) | @ | @ | @ | @ | N | N | N | N | N | N | |||||||||||
STRING (STR) | N | N | |||||||||||||||||||
FLOAT (FLT) | N | N | N | N | N | F | R | N | |||||||||||||
BINARY (BIN) | N | N | N | N | |||||||||||||||||
CODED (COD) | F | F | N | ||||||||||||||||||
FEW VALUED (FV) | @ | @ | |||||||||||||||||||
OCCURS (OCC) | =1 | =1 | N | @ | @ | @ | |||||||||||||||
LENGTH (LEN) | N | @ | N | F | @ | ||||||||||||||||
PAD | N | N | N | N | R | ||||||||||||||||
UPDATE (UPD) | N | ||||||||||||||||||||
BINARY_LARGE_OBJECT (BLOB) | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | ||||
CHARACTER_LARGE_OBJECT (CLOB) | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N | N |
Key to table for combining attributes
Code | Meaning |
---|---|
N | This attribute combination is not legal. |
R | This attribute combination is required. |
@ | One of these attributes is required. You can choose any one of the attributes marked, but you must choose at least one. |
=1 | The OCCURS clause is valid with this attribute only if defined as OCCURS=1. You cannot enter multiple field values for fields with these attributes. |
F | The FLOAT attribute requires the LEN attribute. Since the FLOAT attribute can also be used with the CODED attribute, this is the only circumstance that the LEN attribute is legal with CODED attribute. |
Some of the illegal combinations are direct conflicts, such as UNIQUE and DEFERRABLE; others describe meaningless situations or unusable fields, such as ORDERED CHARACTER and ORDERED NUMERIC.
In addition, some attributes require other attributes. FLOAT, for example, requires a LENGTH specification.
Field descriptions that contain invalid combinations are rejected.
Combining attributes is for Entry Order files. More stringent restrictions are placed on fields that are used as sort keys, hash keys, or record security fields. These restrictions are summarized in the respective Commands and Parameters pages for each.