Using Data in a File as Comparison Constants - 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
ContentType
Programmer’s Guide
Product name
Syncsort™ MFX
Title
Syncsort™ MFX Programmers Guide
Topic type
How Do I
Copyright
2024
First publish date
2010
ft:lastEdition
2024-08-27
ft:lastPublication
2024-08-27T08:14:56.318001

If you want to compare a field to a list of constants which reside in a file, MFX’s join facility could be used instead of INCLUDE or OMIT.

For instance, if you needed to compare a field in a master file to a long list of airport codes, you would normally need to create an INCLUDE or OMIT condition such as

1,3,CH,EQ,C’JFK’,OR,1,3,CH,EQ,C’LAX’,OR,1,3,CH,EQ,C’DFW’,OR,1,3,CH,EQ,C’ ATL’,...

(or the shorthand equivalent 1,3,CH,EQ,L(C’JFK’,C’LAX’,C’DFW’,C’ATL’,...)). But if all the codes were in a second file in the form

....JFK..… (record 1)

....LAX..… (record 2)

....DFW.… (record 3)

....ATL..… (record 4)

................ ...

you could easily use the join facility to read the file directly and compare a field in each record to a field in the master file. This technique would perform the equivalent processing, eliminating the need for a lengthy control statement.

See Using Join Processing To Copy a Large Number of Master File Records for an example of how to do this with MFX’s join facility.