Generating Several Output Files with Different Information - mfx - 3.1

Syncsort™ MFX Programmers Guide

Product type
Software
Portfolio
Integrate
Product family
Syncsort™ software
Product
Syncsort™ MFX > MFX
Version
3.1
ft:locale
en-US
Product name
Syncsort™ MFX
ft:title
Syncsort™ MFX Programmers Guide
Copyright
2025
First publish date
2010
ft:lastEdition
2026-01-27
ft:lastPublication
2026-01-27T08:05:35.548000
L1_Product_Gateway
Integrate
L2_Product_Segment
IBM Infrastructure
L3_Product_Brand
Precisely Syncsort
L4_Investment_Segment
Mainframe
L5_Product_Group
MF Sort/ZPSaver
L6_Product_Name
Syncsort MFX

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.

To generate the three separate files, the following is coded.
Figure 1. JCL and Required Control Statements

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.