Eliminating Duplicate 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
Topic type
How Do I
Copyright
2024
First publish date
2010
Last edition
2024-08-27
Last publish date
2024-08-27T08:14:56.318001

Example: A mailing list is being prepared from an invoice file. To eliminate duplicate entries, any multiple invoice records for the same customer are combined into a single record. (the figure Figure 1 gives the sample record layout.)

Figure 1. Input Record Layout

To combine multiple invoice records and generate the mailing list, the following is coded.

Figure 2. JCL and Required Control Statements

Explanation: To prepare the customer mailing list, the only information required from the invoice records is located in the Company Name field (17,23) and the Address field (40,5), which are selected by the INREC statement. Sorting these records in ascending order by company name generates an alphabetical list. Then, because the file contains a record for every transaction, the SUM statement is used to avoid duplicate listings of customers who have had more than one transaction. Note that because none of the fields contains numeric data to be summed, the FIELDS=NONE parameter is used.