Using POSITION in Operator Statements - 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-08-27
Published on
2024-08-27T08:14:56.318001

The POSITION parameter specifies a starting position.

  • r sets the next position and the previous position to a value. The next position is used when an asterisk (*) replaces p in a field_name statement. The previous position is used when an equal sign (=) replaces p in a field_name statement. Following a POSITION,r statement, either an asterisk (*) or an equal sign (=) can be used for position (p) in the next field_name statement.

    r can be any number from 1 through 32752.

r can be in the form of m.n for specifying a bit position, with m being a number from 1 through 32752 and n being a number from 0 through 7.

Following is an example where POSITION,r is used with other dictionary statements:

Figure 1. Example of POSITION,r in Dictionary Statements

If the dictionary table is printed, it will reflect these substitutions:

Figure 2. Sample Dictionary Table

  • field_name sets the next position and the previous position to the position of the specified field name. The next position is used when an asterisk (*) replaces p in a field_name statement. The previous position is used when an equal sign (=) replaces p in a field_name statement. Following a POSITION,field_name statement, either an * or an = can be used for p in the next field_name statement.

    The field_name used with the POSITION operator can be any previously defined field_name. As a result, POSITION,field_name allows you to map different fields over the same locations.

    Following is an example where POSITION,field_name is used with other dictionary statements:

Figure 3. Example of POSITION,field_name in Dictionary Statements

MFX will print the following dictionary table:
Figure 4. Sample Dictionary Table