Can anyone suggest me can we do do the below logic using joinkeys sort.
I have two files.
File 1:
-------
Length:60 FB
EX:
1111111222222212375678911AAAAA BBBBBB AABB1000
1111111222222212375678911AAAAA BBBBBB AABB1000
1111111222222212375678912AAAAA BBBBBB AABB1000
1111111222222212375678914AAAAA BBBBBB AABB1000
1111111222222212375678911AAAAA BBBBBB AABB1000
1111111222222212375678912AAAAA BBBBBB AABB1000
1111111222222212375678914AAAAA BBBBBB AABB1000
FILE 2:
------
Length:87 FB
EX:
14972709912375678911014.980ISAACS KENNETH
57986877891023469889012.700HALL LAJUAN
21717631812375678914021.240BISCH ANDRE
57553704391023476689019.100CABANA BOWMAN
57986877891023469889012.700HALL LAJUAN
21717631812375678914021.240BISCH ANDRE
57553704391023476689019.100CABANA BOWMAN
EXPECTED OUPUT FILE 1:
----------------------
1111111|2222222|AABB1000|ISAACS|12375678911
1111111|2222222|AABB1000|BISCH |12375678914
1111111|2222222|AABB1000|BISCH |12375678914
EXPECTED OUTPUT FILE 2:
-----------------------
1111111|2222222|12375678911|AABB1000|014.980
1111111|2222222|12375678914|AABB1000|021.240
1111111|2222222|12375678914|AABB1000|021.240
Key comparing in both files are 12375678911,12375678914(file 1--position (15,11) & file 2 --(10,11))
if the keys matched in both records then need to write two files with some records from file 1 & file 2.