Joining Records - 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-03-30
ft:lastPublication
2026-03-30T10:35:28.181000
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: A bank wants to join three separate files to produce a report that shows recent transactions by customers, sorted by outstanding balance. The final report shows transaction information from a transaction file, customer name and address data from a master file containing basic customer information, and the outstanding balance from a third file containing such information. The record layout for the transaction file is contained below in the figure Input Record Layout for First File.

Figure 1. Input Record Layout for First File

Figure 2.  Input Record Layout for Second File

The master file record layout is shown in the figure  Input Record Layout for Second File.

These two files can be joined on the transaction customer number from the first file and the master customer number from the second file. These numbers are in zoned decimal (ZD) format, but because all of the zones are the same in every record, these fields can be used as character data for the join function.

The figure JCL and Required Control Statements contains the JCL and control statements to join these two files.

Figure 3. JCL and Required Control Statements

Next, a third file containing outstanding balances is added.

Figure 4. Input Record Layout for Third File

To do that, the following is coded.

Figure 5. JCL and Required Control Statements

The output from the first step:

Figure 6. Sample Output

The output from the second step:
Figure 7. Sample Output