Example: Marketing wants three output files of customer records. The first will contain a list of U.S. and European customers. The second will contain a list of U.S. customers only, and the third will contain a list of European customers only.
Explanation: Creating the three requested output files requires coding three SORTOFxDD statements in the JCL: SORTOF1, SORTOF2, and SORTOF3 as well as three OUTFIL statements. Each of the OUTFIL statements is connected by a FILES parameter to one of the output files defined in the JCL. Specifying 1 on the FILES parameter connects its OUTFIL statement with the output file defined by the SORTOF1 DD statement in the JCL. Likewise, specifying 2 connects its OUTFIL statement with the output file defined by SORTOF2, and so on. The first output file will contain all the records from the input file (INCLUDE=ALL). The second output file will include only those records that contain the character string 'USA' beginning in byte 67, (INCLUDE=(67,3,CH,EQ,C'USA')), which indicates that these records are for USA customers. And similarly, the third output file will include only those records that contain the character string 'EUR' beginning in byte 67, which indicates that these records are for European customers.