by BillyBoyo » Tue May 10, 2016 9:29 pm
Yes, it is JOINKEYS you want. You have a very simple situation, which is easily covered in the manuals. Have a look at the DFSORT Getting Started manual. The JOINKEYS statement is very simple, and since your data is already ordered, you want to specify SORTED,NOSEQCK. If you don't specify SORTED, it will be SORTed again, by default, which you never want.
You'll need a JOIN statement, to allow matches, and the mismatched file you want. A REFORMAT statement to give you the data, and the match-marker in the REFORMAT so you easily know what type of REFORMAT record you have.