Converting Unprintable Data to Hexadecimal 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: A bank has discovered that some errors were made in recording the Account Numbers of some of its customers. Specifically, on the transaction records, some Account Number fields, which should contain only packed-decimal, PD, data, appear to contain data that is not valid packed-decimal. The figure Sample Input Record Layout shows the input record layout.

Figure 1. Sample Input Record Layout

In order to find the invalid data, the following is coded.
Figure 2. JCL and Required Control Statements

The effect of OUTREC processing on the input record is shown in figure Sample Post-OUTREC Record Layout.

Figure 3. Sample Post-OUTREC Record Layout

Explanation: The records are copied, and OUTREC processing reformats the output record to contain the Customer Name field (1,30) followed in column 36 by the Account Number field converted to hexadecimal format (31,12,HEX). Blanks are automatically inserted in the unspecified columns (31,5). Note that converting the Account Number data to printable hexadecimal expands the original 12-byte field to 24 bytes. The bank can now read the Account Number field in hexadecimal format to determine which records contain invalid data.