This is same JCL as you have posted earlier. I my case there may have Duplicate keys so we need to consider that also. As I had explaied earlier. From my above explanation we van see this here FILE1 contain record with key AL100722922. The same we can see in FILE2. So we need to take this record from FILE1 not from FILE2. In FILE1 there are 5 records and in FILE2 also 5 records. Because there is one duplicate record (AL100722922) we are taking it only from the FILE1. So in output file we should get 9 records. Hope now it is clear.