Page 1 of 1

ICETOOL Compare...

PostPosted: Tue Mar 03, 2009 7:08 am
by Pakelika
Hello,

I am sorta new to the IBM mainframe and was wondering if it is possible to use the Icetool to compare 2 files 'ra11111.test.source(file1)' and 'ra11111.test.source(file)' and have all duplicate records listed in another file 'ra11111.test.source(file3)'?

The files i will be comparing will be as followed:

File 1
itcp2001
itcp2002
itcp2003
itcp2004

File2
a
itcp2002
itcp2004
dfreport

File3 (desired)
itcp2002
itcp2004

Thanks for the help in advance
-cjb

Re: ICETOOL Compare...

PostPosted: Tue Mar 03, 2009 7:51 am
by dick scherrer
Hello and welcome to the forum,

Please check out this prior topic:
dfsort-icetool-icegener/topic845.html

Also, see "Create files with matching and non-matching records" Smart DFSORT Trick at:
http://www.ibm.com/systems/support/stor ... vs/tricks/

Re: ICETOOL Compare...

PostPosted: Tue Mar 03, 2009 10:00 pm
by Frank Yaeger
cjb,

You can use a DFSORT/ICETOOL job like the following to do what you asked for. I assumed your input files have RECFM=FB and the same LRECL, and that there aren't any duplicates within input file1 or within input file2. If those assumptions are incorrect, then you need to give more details about the actual situation.

//S1   EXEC  PGM=ICETOOL
//TOOLMSG   DD  SYSOUT=*
//DFSMSG    DD  SYSOUT=*
//CON DD DSN=...  input file1
//    DD DSN=...  input file2
//OUT DD DSN=...  output file
//TOOLIN DD *
SELECT FROM(CON) TO(OUT) ON(1,8,CH) FIRSTDUP
/*