Simplified Expression of EQ/OR and NE/AND Conditions - 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

INCLUDE/OMIT comparisons implementing EQ/OR and NE/AND conditions can be simplified from having to restate the same field data (p,l,f) when comparing the field with more than one constant.

Since INCLUDE/OMIT comparisons are often coded to compare one field in the record to a long list of constants, this requires repeating the position p, length l and format f (optionally) of the field for each constant. For example,

INCLUDE COND=(1,2,CH,EQ,C'NY',OR,1,2,CH,EQ,C'NJ', OR,1,2,CH,EQ,C'CT',OR,1,2,CH,...)

However, this statement can be simplified to

INCLUDE COND=(1,2,CH,EQ,L(C'NY',C'NJ',C'CT',...))

In the simplified statement above, the field data (1,2,CH) and comparison operator EQ are stated only once; the compared constants are grouped together in parentheses preceded by ‘L’ for ‘list’; and OR is implied by use of EQ in the statement.

This simplified statement is only permitted when the comparison operator is EQ or NE. If EQ is specified, the comparison conjunction OR is implied in the statement. If NE is specified, the comparison conjunction AND is implied in the statement. All constants that are compatible with the p,l,f data field are permitted in the simplified constant list.