Page 1 of 1

Comparison between 2 files which has no common columns

PostPosted: Thu Mar 10, 2016 1:40 am
by sikkandhar
Hi,

I have 2 files. File F1 contains the account number range and File F2 contains the list of account numbers. If the account numbers in File F2 falls under the account range defined in F1, then those account numbers from F2 should be written into output

Contents of F1 - will contain only 1 record


----+----1----+----2----+----3----+----4-
        'A100'                    'A400'
 


Contents of File F2


----+----1
A001      
A010      
A105      
A299      
A351      
A545      
A999      
 


Since account A105, A299 and A351 falls under the range, it should be written out to output


----+----1
A105      
A299      
A351      
 


Can you please guide me in how to get this accomplished using Syncsort or SORT

Thanks
Sikkandhar

Re: Comparison between 2 files which has no common columns

PostPosted: Thu Mar 10, 2016 1:10 pm
by enrico-sorichetti
You will need two steps ...
the first step will read file 1 to generate the sort control statements
the second step will process file 2 using the control statements generated by the first step

You will find quite a few examples searching
here ==> http://www.ibmmainframeforum.com
but more here ==> http://ibmmainframes.com