Keys for keyed data sets are part of the logical records recorded on the data set. You define the length and location of the keys when you create the data set.
The ways you can reference the keys in the KEY, KEYFROM, and KEYTO options are as described under "KEY(expression) Option," "KEYFROM(expression) Option," and "KEYTO(reference) Option" in the PL/I Language Reference.