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
Language
English
Content type
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Topic type
How Do I
Copyright
2024
First publish date
2010
Last edition
2024-08-27
Last publish date
2024-08-27T08:14:56.318001

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.