Previous Topic: Device Contexts

Next Topic: DTL

KEY

The Key (KEY) context contains the fields that are on the key panel display of the device functions that have key panels. These keys apply to the record functions: Edit Record (EDTRCD 1,2,3) and Display Record (DSPRCD 1,2,3).

All the key fields on the access path to which the function is attached are available in this context, along with any associated virtual fields. If you map parameters to the device panel (as mapped or restrictor parameters), they are also available in this context.

The shipped field *CMD key is present in this context only in the exit program user point. It is also present in the detail format. You cannot add function fields to a key panel.

Consider the following example. An Edit Record function is defined for an Employee file, using an access path that has keys defined as follows:

FIL Company REF Known by FIL Company code CDE FIL Company REF Has FLD Company name TXT FIL Employee REF Owned by FIL Company REF FIL Employee REF Known by FLD Employee code CDE FIL Employee REF Has FLD Employee name TXT

Company name is a virtual field on the Employee file through the Owned by relation. The fields available in the KEY context of the action diagram for the function are:

*CMD key Company code Company name Employee code