![]() Defining Alternate Keys |
![]() Virtual Machine |
![]() |
Alternate keys are defined in the PROIV file definition, following the physical file record layout. The physical file must be an external file. Alternate keys are not supported with CO/DIV files.
An alternate key definition is given a name that is different from the name of the PROIV file definition in which it is defined. An alternate key definition name is treated as a file name in some respects and similar rules apply (that is, it must not be more than eight characters in length, and must be unique on the system). The alternate key name is then specified in place of a file definition name in screen/report/update characteristics, and all access to data in the physical file is via the alternate key.
An alternate key definition can specify one or more variables in their entirety, up to a maximum combined length of that allowed for your file management system. However, for reasons of efficiency, in the case of large variables it is more usual to specify partial variables, if the full key is guaranteed to be unique where necessary.
The File Maintenance function automatically creates a file definition header record for each alternate key specified.
Topic ID: 720055