I have two Input files.
Input file:1
------------
Record length:65,FB
Input file:2
-------------
Record length:469,FB
I need to compare the first file field(1,15) with the second file field(1,15).
if it matches then need to write the matched record of the Inputfile1 to the matched outputfile.
if it not matches with the second file then write the unmatched record of the inputfile1 to the unmathced outputfile.
please tell me how to do this using sort(joinkeys).
Input file:1
-------------
111111111111111
333333333333333
555555555555555
777777777777777
888888888888888
Input file:2
-------------
2222222222222 aaaa gggg
1111111111111 trrd hdgf
8888888888888 hrrr reds
9999999999999 jgtf fdes
5555555555555 iuyt wesd
Mathced outputfile
------------------
1111111111111
5555555555555
8888888888888
Unmatched outputfile
--------------------
3333333333333
7777777777777
-------------
111111111111111
333333333333333
555555555555555
777777777777777
888888888888888
Input file:2
-------------
2222222222222 aaaa gggg
1111111111111 trrd hdgf
8888888888888 hrrr reds
9999999999999 jgtf fdes
5555555555555 iuyt wesd
Mathced outputfile
------------------
1111111111111
5555555555555
8888888888888
Unmatched outputfile
--------------------
3333333333333
7777777777777
Thank you so much