coule u plz explain the select statement in the pgm
SELECT FROM(CON) TO(OUT) ON(6,3,CH) LASTDUP
FROM(CON) - specifies CON as the ddname for the input file. CON is a concatenation of file1 and file2, in that order.
TO(OUT) - specifies OUT as the ddname for the output file.
ON(6,3CH) - specifies the key for determining duplicate records.
LASTDUP - keep only the last record of each set of duplicates (in your case, that will be the record from file2). Do not keep nonduplicates.
For complete details on the SELECT operator of DFSORT's ICETOOL (with examples), see:
If you're not familiar with DFSORT and DFSORT's ICETOOL, I'd suggest reading through "z/OS DFSORT: Getting Started". It's an excellent tutorial, with lots of examples, that will show you how to use DFSORT, DFSORT's ICETOOL and DFSORT Symbols. You can access it online, along with all of the other DFSORT books, from: