I have 2 files of FB, LREL 150
I want to check for duplicates in the 2 files, for the first 100 characters only
I would like the matched items to be removed to "report1"
When record is in file 1 only - I would like to write the record out to "file1".
When record is in file 2 only - I would like to write the record out to "file1" with static details (eg. "XXXXXX") appended to the record in position 110.
When there are multiple records in file 1 with multiple matching records in file 2 - then match only the "pairs" to the report, and write out the "unpaired" record to the "file1", adding static details as above if the record is on input file2 only.
Trailer totals on record count and 35,11 would be ideal as well for the output file. This something splice can do, maybe more than 1 step required?
Thanks for looking.
For example.
0000000000000011111111111111121000000000000004R MATCH1 12345 CCCCCCCCCCC
0000000000000011111111111111411 00000000005Q MATCH2 12345 DDDDDDDDDDD
0000000000000011111111111111411 00000000005Q MATCH2 12345 DDDDDDDDDDD
0000000000000011111111111111411 00000000005S MATCH3 12345 FFFFFFFFFFF
0000000000000011111111111111411 00000000005NO MATCH 12345 DDDDDDDDDDD
0000000000000011111111111111121000000000000004R MATCH1 12345 CCCCCCCCCCC R
0000000000000011111111111111121000000000000004R MATCH1 12345 CCCCCCCCCCC R
0000000000000011111111111111411 00000000005Q MATCH2 12345 DDDDDDDDDDD Q
0000000000000011111111111111411 00000000005S MATCH3 12345 FFFFFFFFFFF S
0000000000000011111111111111411 00000000005S MATCH3 12345 FFFFFFFFFFF S
0000000000000011111111111111411 00000000005NO MATCH 12345 EEEEEEEEEEE
REPORT
0000000000000011111111111111121000000000000004R MATCH1 12345 CCCCCCCCCCC
0000000000000011111111111111121000000000000004R MATCH1 12345 CCCCCCCCCCC R
0000000000000011111111111111411 00000000005Q MATCH2 12345 DDDDDDDDDDD
0000000000000011111111111111411 00000000005Q MATCH2 12345 DDDDDDDDDDD Q
0000000000000011111111111111411 00000000005S MATCH3 12345 FFFFFFFFFFF S
0000000000000011111111111111411 00000000005S MATCH3 12345 FFFFFFFFFFF S
FILE
0000000000000011111111111111121000000000000004R MATCH1 12345 CCCCCCCCCCC R XXXXXX
0000000000000011111111111111411 00000000005Q MATCH2 12345 DDDDDDDDDDD
0000000000000011111111111111411 00000000005S MATCH3 12345 FFFFFFFFFFF XXXXXX
0000000000000011111111111111411 00000000005NO MATCH 12345 DDDDDDDDDDD
0000000000000011111111111111411 00000000005NO MATCH 12345 EEEEEEEEEEE