From: frenchy on
Is there a way to read in two files, and if there are duplicates, DON'T
write either one of the duplicates to an output file? I.e. end up with
an output file that only has recs (from either file)that didn't have
duplicates? I've been doing it with Cobol but figured there's got to
be a trick way to do this with the sort I've been using too. thanks!

From: Howard Brazee on
On 13 Apr 2006 08:49:06 -0700, "frenchy" <mf101723(a)msn.com> wrote:

>Is there a way to read in two files, and if there are duplicates, DON'T
>write either one of the duplicates to an output file? I.e. end up with
>an output file that only has recs (from either file)that didn't have
>duplicates? I've been doing it with Cobol but figured there's got to
>be a trick way to do this with the sort I've been using too. thanks!

Yep. I copied Frank Yaeger with your message.
From: yaeger on
You can use a DFSORT/ICETOOL job like the following:

//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//CON DD DSN=... input file1
// DD DSN=... input file2
//OUT DD DSN=... output file
//TOOLIN DD *
SELECT FROM(CON) TO(OUT) ON(p,m,f) NODUPS
/*

where p,m,f is the starting position, length and format of the "key"
you want to use to check for duplicates, e,g. ON(1,50,CH). NODUPS says
to select records with no duplicates.

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:

www.ibm.com/servers/storage/support/software/sort/mvs/srtmpub.html

Frank Yaeger - DFSORT Team (IBM) - yaeger(a)us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

From: frenchy on
That worked after I added a dummy ssmsg dd, very slick, we basically
just use pgm=sort for everything here so I passed this around. thanks!
Frenchy

From: yaeger on
Oh, sorry ... I forgot the //DFSMSG DD SYSOUT=* statement for the
DFSORT messages. //SSMSG DD SYSOUT=* will work too.

Frank Yaeger - DFSORT Team (IBM) - yaeger(a)us.ibm.com
Specialties: ICETOOL, IFTHEN, OVERLAY, Symbols, Migration
=> DFSORT/MVS is on the Web at http://www.ibm.com/storage/dfsort/

 |  Next  |  Last
Pages: 1 2
Prev: WTB SPF/PC V4
Next: Mainframe simulator