I have 2 Sequential Files (File A & File B), LRECL = 500 & RECFM = FB. My Requirement is, If a Record is Present in File B & Not present in File A then Record Should Be written to Output File. If Record is Present in File A but Not in File B Should Not Written To Oupt Put File. If Record is Present in Both Files Record should not be written to Ouptput File.
Below is Example.
File A.
ABCD|12345|ABCD123|XYZ
ABCD|12345|HIJKL123|XYZ
ABCD|12345|OPQR123|XYZ
ABCD|12345|AAAA123|XYZ
ABCD|12345|BBBBB23|XYZ
ABCD|12345|DDDDD3|XYZ ---> This Record is Not present in File B. Should Not written to O/P File.
File B.
ABCD|12345|DDDD123|XYZ ---> Should Get Written To O/P File
ABCD|12345|KKKKK23|XYZ ----> Should Get Written To O/P File
ABCD|12345|OPQR123|XYZ ----> Should Not written to O/P File.
ABCD|12345|AAAA123|XYZ ----> Should Not written to O/P File.
ABCD|12345|BBBBBB23|XYZ ----> Should Not written to O/P File.
Sort Criteria is SORT=(1,500,CH,A).
Thanks
Kind Rgds
Vineet Anand.