OVERLAY Parameter (Optional) - 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

The OVERLAY parameter enables you to change particular columns and add fields to the end of a record without rebuilding the entire record. When using the OVERLAY parameter you only need to specify the columns you want to change. The rest of the input record remains unchanged.

The format of the OVERLAY parameter is similar to that of the FIELDS parameter of the INREC and OUTREC control statements. Under the OUTREC control statement, see Figure 1 for the format of the OVERLAY parameter. The following exceptions apply:

  • In the OVERLAY parameter the length l is always required, unlike one case of the FIELDS parameter in which l is optional after p.

  • In the OVERLAY parameter for a variable-length record, the column value c: is always required and must be set at 5 or greater, since c: is set to 1 by default and positions 1 through 4 comprise the RDW. The RDW cannot be overlaid.

The OVERLAY parameter automatically makes the following changes to the output record to accommodate any adjustments in length. In a variable-length record, the RDW length is adjusted accordingly. In a fixed-length record, the record is padded with blanks when necessary. Blanks also replace missing bytes in input fields.

Modifications to records will be made in the order of the OVERLAY parameters specified. If you modify the same field more than once, the second and subsequent modifications will apply to the previously modified field.

The following is an example of the OVERLAY parameter:
Figure 1. Sample OVERLAY parameter

This OUTREC control statement refers to an 80-byte record. The OVERLAY parameter subtracts the Payments field (13,4,PD) from the Balance Due field (9,4,PD). This updated Balance Due amount is entered in a new, displayable field at the end of the record.

In an OUTFIL control statement, the OVERLAY parameter may be used with FTOV, VLTRAIL, or VLTRIM. The OVERLAY parameter may not be used with CONVERT or VTOF. Under the OUTFIL control statement, see FTOV Parameter (Optional) for a complete description of the FTOV parameter, VLTRAIL Parameter (Optional) for a complete description of the VLTRAIL parameter, and VLTRIM Parameter (Optional) for a complete description of the VLTRIM parameter.