Preserving the original sequence of records with equal keys

You can preserve the order of identical collating records from input to output.

Use one of these techniques:

  • Install DFSORT with the EQUALS option as the default.
  • Provide, at run time, an OPTION card that has the EQUALS keyword in the IGZSRTCD data set.
  • Use the WITH DUPLICATES IN ORDER phrase in the SORT statement. Doing so adds the EQUALS keyword to the OPTION card in the IGZSRTCD data set.

    Do not use both the NOEQUALS keyword on the OPTION card and the DUPLICATES phrase, or the run unit will end.

related references  
DFSORT Application Programming Guide (OPTION control statement)