Example 2: Specify a keyed sequence access path without using DDS

This example shows how to arrange records using multiple key fields.

If you want the records to be processed by Cust sequence and then by Date in Cust, specify:
OPNQRYF    FILE(FILEA) KEYFLD(CUST DATE)
If you want the Date to appear in descending sequence, specify:
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.)