Dividing Output into Sections - 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 personnel roster is to be divided into sections by Department. (the figure Figure 1 presents the layout for the input record.)

Figure 1. Input Record Layout

To sort the records and generate a list that is divided by Department, the following is coded.

Figure 2. JCL and Required Control Statements

A sample of the listing generated is shown in the following figure.

Figure 3. Sample Output

Explanation: After the records are sorted alphabetically by Department (15,5) and Employee Name (1,14), they are divided into sections by department. That is, every time there is a change in the Department field (15,5 in the input record) the printer skips 5 lines (5L) before printing the next record. (Note, in the Sample Output above, the five-line break that occurs between ACCTG and PRSNL.) The OUTREC parameter is used to reposition the record fields and to leave blanks between them.