My requirement goes in this way. I need to join two files. Below mentioned were the two input files:-
File1:-
TEST NUM
====== =====
TEST1 0200
TEST3 0300
TEST4 0400
TEST2 0500
TEST5 0600
====== =====
TEST1 0200
TEST3 0300
TEST4 0400
TEST2 0500
TEST5 0600
File2:-
TEST NUM
====== =====
TEST1 0300
TEST2 0200
TEST3 0400
TEST4 0600
TEST5 0400
====== =====
TEST1 0300
TEST2 0200
TEST3 0400
TEST4 0600
TEST5 0400
I need to join two files. Where in the fields in column TEST can act as a key field and it compares the Values present in the NUM column of both the files and value's in the NUM column of File1 should be less than the value in File2 . The output file should contain the records of file1 based on the above conditions.
The fields that meet the above criteria should be of in one file and rest should be in another file.
Outputfile1:-
TEST NUM
====== =====
TEST1 0200
TEST3 0300
TEST4 0400
====== =====
TEST1 0200
TEST3 0300
TEST4 0400
Outputfile2:-
TEST NUM
====== =====
TEST2 0500
TEST5 0600
====== =====
TEST2 0500
TEST5 0600
Can someone provide me the sortcard in achieving the above if possible.
Thanks a lot in advance!!!!!