This example shows how to arrange records using multiple key fields.
OPNQRYF FILE(FILEA) KEYFLD(CUST DATE)
OPNQRYF FILE(FILEA) KEYFLD((CUST) (DATE *DESCEND))
In these two examples, the FORMAT parameter is not used. (If a different format is defined, all key fields must exist in the format.)