Sort and merge considerations

This topic discusses the runtime aspects of sort and merge operations. For details on the compile-time aspects of sort and merge, including instructions on coding the sort and merge procedures, see your compiler programming guide.

Under Language Environment, you can invoke the sort facility to sort or merge records in a particular sequence. A sort operation takes an unordered sequence of input data, arranges it according to a specified key or pattern, and places it into an output file. A merge operation compares two or more files that have already been sorted according to an identical key and combines them in a specified order in an output file.

To invoke the sort facility in Language Environment, you can use either of the following:
  • An HLL construct
    • COBOL's SORT and MERGE statements. (The SORT and MERGE statements are not supported when running under z/OS® UNIX.)
    • PL/I's PLISRTx interface, where x is replaced by A, B, C, or D

      You cannot call the PLISRTx interface under CICS®.

  • A method other than an HLL construct (for example, assembler routines, JCL, or ISPF).

Under Language Environment, your IBM® sort/merge licensed program must be DFSORT or an equivalent that honors the DFSORT extended parameter list. Whenever DFSORT is mentioned in this topic, you can use any equivalent SORT product.

Restriction: SORT and MERGE is not supported in a POSIX(ON) environment.