Inserting Binary Zeros - 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: A manufacturing firm has decided to expand its product line. However, because the Item Number field on its inventory records is too small, the records must be reformatted to allow for more columns for the new products. The Item Number is kept in packed-decimal (PD) format, and the firm wants to add 4 bytes to the current 2 byte field. The new bytes are to precede the current two bytes. The following figure gives the input record layout.

Figure 1. Input Record Layout

To copy the records and insert the 4 bytes of binary zeros, the following is coded.

Figure 2. JCL and Required Control Statements

The effect of OUTREC processing is shown in the figure below.

Figure 3. Post-OUTREC Record Layout

Explanation: The records are copied, and OUTREC processing adds 4 bytes of binary zeros (4Z) to the beginning of the Item Number field (21,2). To allow for the 4 additional bytes, the original Item Number field and the fields following it are all copied after the 4 inserted bytes of zeros.