Help on ICETOOL regarding eliminating rduplicates



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

Help on ICETOOL regarding eliminating rduplicates

Postby dkm1987 » Fri Oct 19, 2012 2:59 pm

Hello everyone,

I need a help on one of my requirement..

I've a PS file with RECFM - FB.(The LRECL will be dynamic) I want to eliminate the duplicates in such a manner, that if there are any duplicate records, then NONE of them should be copied to output file.. am giving a sample scenario below

FILE
----
AAAA
BBBBB
CCCC
AAAA
AAAA
DDDD
BBBBB

Expected o/p
--------------
CCCC
DDDD

Requesting help on this... Thanks in advance ! :)
dkm1987
 
Posts: 5
Joined: Fri Oct 19, 2012 12:12 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Help on ICETOOL regarding eliminating rduplicates

 

Re: Help on ICETOOL regarding eliminating rduplicates

Postby BillyBoyo » Fri Oct 19, 2012 3:14 pm

Have you looked at the documentation for SELECT?
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Help on ICETOOL regarding eliminating rduplicates

Postby skolusu » Fri Oct 19, 2012 9:52 pm

dkm1987,

Use the following DFSORT/ICETOOL JCL which will give you the desired results

//STEP0200 EXEC PGM=ICETOOL                 
//TOOLMSG  DD SYSOUT=*                       
//DFSMSG   DD SYSOUT=*                       
//IN       DD *                             
----+----1----+----2----+----3----+----4----+
AAAA                                         
BBBBB                                       
CCCC                                         
AAAA                                         
AAAA                                         
DDDD                                         
BBBBB                                       
//OUT      DD SYSOUT=*                       
//TOOLIN   DD *                             
  SELECT FROM(IN) TO(OUT) ON(1,5,CH) NODUPS 
//*
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort

These users thanked the author skolusu for the post:
dkm1987 (Sat Oct 20, 2012 12:57 am)
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times

Re: Help on ICETOOL regarding eliminating rduplicates

Postby dkm1987 » Mon Oct 22, 2012 3:31 pm

Hi Kolusu,

Thanks for the help ! :)
dkm1987
 
Posts: 5
Joined: Fri Oct 19, 2012 12:12 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Help on ICETOOL regarding eliminating rduplicates

Postby dkm1987 » Mon Oct 22, 2012 4:15 pm

Hi Kolusu,

I got the desired o/p... but, one more question.,.. My key will be always the length of the file (starts from 1st pos till last pos). And this varies at run time. So is there a way to code the "ON" field such a way that each time it'll take the max length (LRECL) of the file ?

A help from anyone will be highly appreciated.. Thanks much ! :)
dkm1987
 
Posts: 5
Joined: Fri Oct 19, 2012 12:12 pm
Has thanked: 1 time
Been thanked: 0 time

Re: Help on ICETOOL regarding eliminating rduplicates

Postby BillyBoyo » Mon Oct 22, 2012 5:46 pm

Presumably your records are fixed-length?

There is nothing to directly get you the LRECL of a dataset in the Sort control cards.

You could consider a symbol/SYMNAME for the ON.

That could be generated. If you have a little step with FTOV on OUTFIL (to convet Fixed to Variable) and just put one record on an output file (STOPAFT=1) you would subsequently be able to get at the record-length of that one record, and use it go generate your symbol/SYMNAME with an ending value of 1,2,BI,SUB,+4,TO=ZD,LENGTH=4.

Note that with one ON you are limited to checking 4000 bytes maximum.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Re: Help on ICETOOL regarding eliminating rduplicates

Postby skolusu » Mon Oct 22, 2012 11:09 pm

dkm1987 wrote:Hi Kolusu,

I got the desired o/p... but, one more question.,.. My key will be always the length of the file (starts from 1st pos till last pos). And this varies at run time. So is there a way to code the "ON" field such a way that each time it'll take the max length (LRECL) of the file ?

A help from anyone will be highly appreciated.. Thanks much ! :)


As bill mentioned you need to change your ON statement for every file you get as input and maximum value is 4000 bytes.

Check this link for detailed explanation of SELECT statement

http://publibz.boulder.ibm.com/cgi-bin/ ... 1CA60/7.14?
Kolusu - DFSORT Development Team (IBM)
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
skolusu
 
Posts: 586
Joined: Wed Apr 02, 2008 10:38 pm
Has thanked: 0 time
Been thanked: 39 times


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post