Printing Input Records on Multiple Output Lines - 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
2024
First publish date
2010
ft:lastEdition
2025-02-20
ft:lastPublication
2025-02-20T09:24:15.574000
Example: In this example, five input record fields, shown in the figure Input Record Layout, are copied to an output file with each field printed as a separate output line.
Figure 1. Input Record Layout

Multiple output lines are created by specifying a new line character, i.e. / (slash), in the OUTREC parameter of an OUTFIL control statement. As shown in the figure Figure 2, the new line character follows the specification of each input field’s starting position and length.

Figure 2. JCL and Control Statements for Multiline Output

Once MFX has printed the data in the COMPANY NAME field, it starts a new output line, prints on it the data in the next field, CUSTOMER NAME, starts a new line, and so forth. After printing the contents of the last field (CITY, STATE AND ZIP), MFX creates two new lines (2/).

The figure Sample Multiline Output provides an excerpt from the output file where the input record is formatted on multiple lines. A blank line appears in the second and third set of multiline output because the corresponding input record fields (i.e. CUSTOMER TITLE and CUSTOMER NAME) were blank.

Figure 3. Sample Multiline Output