You are here: Defining Files and Fields > Editing Table Layouts > Native and Key Fields

Native and Key Fields

When using Analyzer’s Data Definition Wizard to define keyed data sources, parameters are automatically included in the field definition within the table layout to designate a NATIVE field and to denote KEY fields for the host:

NATIVE - indicates the field name that is known to the host data source and
KEY - indicates that the field is a key field for the data source

The field definition in the table layout for a NATIVE field will appear as:

CUST_ACCT EBCDIC 1 6 NATIVE "CUSACTNO"

The field definition in the table layout for a NATIVE KEY field will appear as:

CUST_ACCT EBCDIC 1 6 KEY NATIVE "CUSACTNO"

For NATIVE fields, the NATIVE field parameter is automatically inserted into the field definition when the Wizard detects a NATIVE field name. There is no way to View or edit this parameter within Analyzer.

For KEY fields, Analyzer displays a KEY column in the Table Layout list View identifying any fields (NATIVE or not) flagged as keys. Also, when editing a field, clicking on the Advanced button will display the key field checkbox (checked for a key field).

Note: By default, if a field is denoted as a KEY field in the table layout, it will automatically be chosen as the key field in any command dialog requiring a key field to be specified. If a column is highlighted in the View, then that column will take precedence as the “key” in any relevant command dialogs. Regardless, users can always choose an alternate key field within a command dialog as required.

In Analyzer's Visual Data Relations editor, NATIVE key fields are displayed with an asterisk preceding the actual NATIVE key field name. In Analyzer's Overview, any file referencing a host index will display an Index icon followed by an asterisk and the NATIVE key field name (if applicable) rather than an Index name.

For ISAM and VSAM files, NATIVE key field name is generated by the Wizard. ISAM and VSAM don't store a name for the NATIVE key field but instead uses its start position and length to locate and read NATIVE key field data.

For IMS databases, the NATIVE key field name (one per segment) is specified in the Database Definition (DBD). Although an Analyzer end user might name a NATIVE key field anything at all using the Wizard, IMS keyed access is based solely on the NATIVE key field name.

For other keyed data sources (including DB2 and ADABAS), the NATIVE field name follows the same rules as for IMS. However, the concept of a KEY is not critical and therefore the KEY field modifier is not used.

For ISAM / VSAM files and IMS databases, NATIVE keyed access is only allowed for NATIVE key character fields. For DB2, NATIVE field access is supported for any character fields. For ADABAS, NATIVE field access is supported for any descriptor fields.

For more information on using NATIVE and KEY fields see Push Down Filtering.