Reordering the Positions of Record Fields - 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 data center has decided to reorder the positions of the data fields in masterfile records after sorting them. (The following figure gives the layout for the masterfile record.)

Figure 1. Input Record Layout

To sort the records alphabetically by product name and reposition the data fields, the following is coded:

Figure 2. JCL and Required Control Statements

The following figure shows the output record after OUTREC processing.

Figure 3. Post-OUTREC Record Layout

Explanation: After the records are sorted alphabetically by product name (7,15,CH), OUTREC processing moves the Product Code field (22,3) to the first byte of the record, the Product Name field (7,15) to the fourth byte, the Region field (1,2) to the nineteenth byte, the Month’s Sales field (25,4) to the twenty-first byte, and the Sales to Data field (3,4) to the twenty-fifth byte.