Field attribute combinations: Difference between revisions

From m204wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 34: Line 34:
<tr>
<tr>
<td>KEY</td>
<td>KEY</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
Line 54: Line 55:
<td>N</td>
<td>N</td>
<td>N</td>
<td>N</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>

Revision as of 23:07, 29 January 2014

Combining attributes

When deciding on combinations of field attributes, use the following chart to see if the combination you want to use is valid.
The chart key explains the codes used in the chart.

Field attribute combinations
Attribute KEY ORD CHAR ORD NUM FRV UNQ NR DEF LVL ONE INV STR FLT BIN COD FV OCC LEN PAD UPD BLOB CLOB MINLOBE CHUNK UTF8 UTF16
KEY                                       N N        
ORD CHAR     N N               N                       N N
ORD NUM   N   N   N                           N N        
FRV R N N   N                             N N        
UNIQUE (UNQ)   @ @ N     N                         N N        
NUM RANGE (NR)     N                 N       =1       N N        
DEFERRABLE (DEF) @ @ @   N @                           N N        
(LVL)                                                  
AT-MOST-ONE (ONE)                   N                              
INVISIBLE (INV) @ @ @     @     N     N       N N N N N N        
STRING (STR)                       N N             N N        
FLOAT (FLT)   N       N       N N   N F     R N   N N        
BINARY (BIN)                     N N         N N   N N        
CODED (COD)                       F         F N   N N        
FEW VALUED (FV)         @                 @           N N        
OCCURS (OCC)           =1     =1 N     @ @     @                
LENGTH (LEN)                   N   @ N F   @       N N        
PAD                   N   N N N     R     N N        
UPDATE (UPD)                   N                              
BINARY_LARGE_OBJECT (BLOB) 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          
MINLOBE (MINLOBE) N N N N N N N     N N N N N N   N N   N          
CHUNK (CHUNK) N N N N N N N     N N N N N N   N N   N          
UTF8 (UTF-8) N N N N N N N     N N N N N N   N N   N          
UTF16 (UTF-16) N N N N N N N     N N N N N N   N N   N          

Key to chart codes

Code Meaning
N This attribute combination is not valid.
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 valid with CODED attribute.

Some of the invalid 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.

The Field attribute combinations chart 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 discussion in the Rocket Model 204 Parameter and Command Reference.