First excuse if this question has been answered.
I need matching two files (T01, T02) with 124 length both and obtain a third file with 128 length. The two files
are ordered by the first 31 position.
If two records are the same (if the keys of both files are the same) I don't want to make nothing. Must be ignored
If the key of first file is greater than the key of second file, I write the output file with this record put at the finish AT01
If the key of first file is less than the key of second file, I write the output file with this record put at the finist BT02
file 1 (T01 with 124 positions)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CCCCCCCCAAAAAAAAAAAAAAAAAAAAAAFxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBAxxxxxxxxxxxxxxxxxxxxxxxxxxxx
CCCCCCCCBBBBBBBBBBBBBBBBBBBBBBBxxxxxxxxxxxxxxxxxxxxxxxxxxxx
DDDDDDDDBBBBBBBBBBBBBBBBBBBBBBFxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAACCCCCCCCCCCCCCCCCCCCCCDxxxxxxxxxxxxxxxxxxxxxxxxxxxx
file 2 (T02 with 124 positions)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAxxxxxxxxxxxxxxxxxxxxxxxxxxxx
BBBBBBBBAAAAAAAAAAAAAAAAAAAAAABxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBAxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBBxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBExxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBGxxxxxxxxxxxxxxxxxxxxxxxxxxxx
AAAAAAAACCCCCCCCCCCCCCCCCCCCCCDxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Outfile (128 positions)
BBBBBBBBAAAAAAAAAAAAAAAAAAAAAABxxxxxxxxxxxxxxxxxxxxxxxxxxxxBT02 (the first 31 position are not in the first file)
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFxxxxxxxxxxxxxxxxxxxxxxxxxxxxAT01 (the first 31 position are not in the second file)
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBExxxxxxxxxxxxxxxxxxxxxxxxxxxxBT02 (the first 31 position are not in the first file)
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBFxxxxxxxxxxxxxxxxxxxxxxxxxxxxAT01 (the first 31 position are not in the second file)
AAAAAAAABBBBBBBBBBBBBBBBBBBBBBGxxxxxxxxxxxxxxxxxxxxxxxxxxxxBT02 (the first 31 position are not in the first file)
The sames record don't must be appair in the output file
the position after the key are not relevant
Thank you