I have been trying my luck with the solution above, and have been reading and learning about the DFSORT/ICETOOL instructions given here. However, there seems to be some problem here. Obviously, there might be some facts which I may have missed while asking the question.
File 1 has a total of 2505 records. To my knowledge these are not duplicate. However, when I ran a DFSORT job with following control cards I am left with 2438 records.
So, I am concluding that there were probably some records which were duplicates and were removed with the above job.
I did the same with File 2, but the no. of records remain the same. Hence, I am presuming that there are no duplicates here. I now have 45706 records in File 2.
//FILE1 DD DISP=SHR,DSN=FILE1
//FILE2 DD DISP=SHR,DSN=FILE2
//TFILE1 DD DSN=&&TFILE1,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//TFILE2 DD DSN=&&TFILE2,UNIT=SYSDA,SPACE=(CYL,(5,5)),DISP=(,PASS)
//CONCAT DD DSN=*.TFILE1,UNIT=SYSDA,DISP=(OLD,PASS),
// DD DSN=*.TFILE2,UNIT=SYSDA,DISP=(OLD,PASS),
//ALLRECS DD SYSOUT=* names in File1 only
//REPORT DD DISP=OLD,DSN=REPORT SPACE=(CYL,(5,5))
//TOOLIN DD *
COPY FROM(FILE1) USING(CTL1)
COPY FROM(FILE2) USING(CTL2)
COPY FROM(CONCAT) TO(ALLRECS)
SELECT FROM(CONCAT) TO(REPORT) ON(6,44,CH) LASTDUP
//CTL1CNTL DD *
//CTL2CNTL DD *
Now, I expect the REPORT to contain a max of 2438 records. However, I end up with 2708 records. This doesn't seem to be correct?? I don't want to / CAN'T check each record individually to find out which are the extra records that have been included here and why. What am I missing here?