Key Spec

From BR Wiki
Jump to: navigation, search

The "key-spec" parameter indicates that the starting key positions and key lengths for up to six sections of a record are to be inserted at this point in the syntax. The following syntax can be inserted wherever the "key-spec" parameter appears in a diagram:

Key Spec Syntax

[, KPS=<starting pos>[/...] , KLN=<length>[/...]]

Keyspec.png

This syntax can be inserted where 'key-spec' is specified in a statement's main syntax. Key Spec indicates the starting positions and lengths of up to six different key sections in a record. This parameter can be used only when the program is to create a new master file and a new index file. It is not necessary for the key sections to be adjacent to one another, but they may not exceed a combined length of more than 128 bytes.

Within the key-spec syntax, the "KPS=" keyword may be followed by up to six "starting pos" specifications, each of which identifies the starting position of a key section; multiple specifications are separated by a forward slash.

The "KLN=" keyword must be followed by the "length" parameter, which identifies the lengths of each of the key sections which were specified by the "starting pos" parameter.