revdpoel
New User
Joined: 01 Nov 2006 Posts: 56
|
|
|
|
I have an input dataset, FB 80, with 6 million rows
it has a header-record (recordcode 0), a datarecord (recordcode 1) and a trailerrecord (recordcode 9)
The datarecords contain om position 2-5 a code. I have to list the codes that are present in more then one record
input
0
11267
13456
11267
18989
9
output (in a dataset or just sysout)
1267
Who can help me?
Thnx |
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Here's a DFSORT/ICETOOL job that will do what you asked for:
Code: |
//S1 EXEC PGM=ICETOOL
//TOOLMSG DD SYSOUT=*
//DFSMSG DD SYSOUT=*
//IN DD DSN=... input file (FB/80)
//OUT DD DSN=... output file (FB/80)
//TOOLIN DD *
SELECT FROM(IN) TO(OUT) ON(2,4,CH) FIRSTDUP USING(CTL1)
/*
//CTL1CNTL DD *
INCLUDE COND=(1,1,CH,EQ,C'1')
OUTFIL FNAMES=OUT,BUILD=(2,4)
/*
|
|
|