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
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: 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