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

This example shows how to arrange records using one key field.

Assume that you want to process the records in FILEA arranged by the value in the Cust field with program PGMD. You can specify:
OVRDBF     FILE(FILEA) SHARE(*YES)
OPNQRYF    FILE(FILEA) KEYFLD(CUST)
CALL       PGM(PGMD)
CLOF       OPNID(FILEA)
DLTOVR     FILE(FILEA)
Note: The FORMAT parameter on the Open Query File (OPNQRYF) command is not needed because PGMD is created by specifying FILEA as the processed file. FILEA can be an arrival sequence or a keyed sequence file. If FILEA is keyed, its key field can be the Cust field or a totally different field.