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
Language
English
Content type
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Copyright
2024
First publish date
2010
Last updated
2024-11-06
Published on
2024-11-06T17:38:26.716054

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