You haven't given enough information for anyone to help you. Please give a more complete description of what you're trying to do. Show an example of the records in each input file and the records you expect for output. Give the RECFM and LRECL of the input files.
My assumption is two files are same length. First merge the 2 files then you will get one file with duplicates. Then sort that file by using sum fields = none (it will delete duplicates).i.e you will get distinct records.
It's difficult to say if you're right or wrong given that we don't know what Rajat actually wants to do. However, it's not clear what you mean by "merge the 2 files, ... then sort". You don't need a MERGE and SORT to remove duplicates. Files can only be merged if they are already in sorted order in which case you could remove the duplicates with just a MERGE. If the files are not already sorted, then you could remove the duplicates with just a SORT by concatenating the two input files. But we don't really know what Rajat wants, so let's wait until Rajat tells us.