Previous Topic: Key and Data Differentiation

Next Topic: Update Restrictions on Alternate Indexes

Key Extraction Options

The rules for data presentation allow accurate prediction of what each &FILE GET variable contains regardless of which key is used to retrieve a record. However, the effects of key extraction from record data can sometimes prevent the use of common processing logic when the same procedure uses different keys to access the same UDB.

The &CONTROL option NOKEYXTR lets you leave the key in the data portion of the record (as well as placing a copy of the key in &FILEKEY as usual). This option applies only when reading data using a key that does not start at offset 0 within the record.

The effect of NOKEYXTR is to eliminate null variables occurring after an &FILE GET (where the null represents the original location of the key). NOKEYXTR also eliminates the splitting of single fields into two when the key happens to overlay part of a single field.

Use NOKEYXTR in procedures that reference a UDB under multiple keys where you want to provide common processing routines for specific fields within the records.