Library View Topics Framed Contents Revised Topics Previous Topic Next Topic Search Search ResultsPrevious Topic MatchNext Topic Match Notes List Notes Print Download No PDF Handheld DisconnectedHandheld ConnectedHelp

4.2.9 RECORD KEY Clause



The RECORD KEY clause (Format 2) specifies the data item within the record that is the prime RECORD KEY for an indexed file. The values contained in the prime RECORD KEY data item must be unique among records in the file.

data-name-2
The prime RECORD KEY data item. It must be described as an alphanumeric item within a record description entry associated with the file.


X As an IBM extension, data-name-2 can be numeric, numeric-edited,
X alphanumeric-edited, alphabetic, floating-point (both external and
X internal), or a DBCS data item. The key is treated as an alphanumeric
X item for the input and output statements for the file named in the
X SELECT clause. When you specify data-name-2 as a DBCS data item, a
X key specified on the READ statement must also be a DBCS data item.

Data-name-2 must not reference a group item that contains a variable occurrence data item. Data-name-2 can be qualified.


X As an IBM extension, if the indexed file contains variable-length
X records, data-name-2 need not be contained within the first "x"
X character positions of the record, where "x" equals the minimum record
X size specified for the file. That is, data-name-2 can be beyond the
X first "x" character positions of the record, but this is not
X recommended.


X Data-name-2 cannot be a windowed date field.

The data description of data-name-2 and its relative location within the record must be the same as those used when the file was defined.

If the file has more than one record description entry, data-name-2 need only be described in one of these record description entries. The identical character positions referenced by data-name-2 in any one record description entry are implicitly referenced as keys for all other record description entries of that file.

For EXTERNAL files, all file description entries in the run unit that are associated with the EXTERNAL file must specify the same data description entry for data-name-2 with the same relative location within the associated record.


X The requirement for identical data description entries is not enforced,
X but the key must have the same relative location in the records, as well
X as the same length.

Previous Topic Next Topic © Copyright IBM Corp. 1991, 1998

IBM Library Server Copyright 1989, 2005 IBM Corporation. All rights reserved.





Return to library:   z/OS | z/OS.e | TPF | z/VSE | z/VM | IBM Hardware | IBM System z Redbooks
Glossary:   IBM terminology
Publications:   How to order publications
Readers:   Download IBM Library Reader | Download IBM Softcopy Reader | Download Adobe® Acrobat® Reader®
Library management:   Download IBM Softcopy Librarian
Contacts:   Contact z/OS


Adobe, the Adobe logo, Acrobat, the Acrobat logo, and Acrobat Reader are registered trademarks of Adobe Systems incorporated.