Thanks for the reply.
I am not sure if I am missing anything. Here are the problems I am facing.
(a) We have SYNCSORT, which did not recognize DUPKEYS, so could not use that with SYNCSORT.
(b) I tried the same code with ICETOOL, but did not work, it just gave the same data as output. No difference, no total.
this is what it looks like
//STEP01 EXEC PGM=ICETOOL
//INPT DD *
HEADERHOME 04272009113000 0000001
HEADERHOME 04272009113200 0000001
HEADERHOME 04272009113500 0000003
//OUPT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSUDUMP DD SYSOUT=*
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//TOOLIN DD *
COPY FROM(INPT) TO(OUPT) USING(CTL1)
//CTL1CNTL DD *
Am I missing something ? I do not want all the header records to be copied.. just one (first one).
Thanks in advance.