Putting a Data Field in Standard Format   - 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: The date field on insurance-policy records is stored in zoned-decimal format but without slashes separating the month, day, and year. After the records are sorted, these slashes will be inserted and the date will appear in the standard mm/dd/yy format. (The following figure gives the input record layout.)

Figure 1. Input Record Layout

To sort the records and format the date field with the required slashes, the following is coded.

Figure 2. JCL and Required Control Statements

The effect of OUTREC processing is shown in the figure Figure 3.

Figure 3. Post-OUTREC Record Layout

Explanation: The records are sorted alphabetically by Member Name (1,23,CH). The OUTREC statement repositions the Effective Date field (24,6,ZD) and the Policy Number field (30,8,ZD) in columns 30 and 45 respectively, leaving blanks between each of the three fields. In addition, the OUTREC statement edits the Effective Date field with an M9 editing mask that places slashes between the month, date, and year. Note that editing the Date field increases its size from six to eight bytes.