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

This example shows how to arrange records using a unique-weight sort sequence.

To process the records by the JOB field values with a unique-weight sort sequence using the STAFF file in Table 1, specify:
OPNQRYF FILE(STAFF) KEYFLD(JOB) SRTSEQ(*LANGIDUNQ) LANGID(ENU)
This query results in a JOB field in the following sequence:
  • Clerk
  • mgr
  • Mgr
  • Mgr
  • MGR
  • sales
  • Sales
  • Sales
  • Sales
  • SALES