ICETOOL/ICEMAN Help needed !



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

ICETOOL/ICEMAN Help needed !

Postby denis.dhimitri » Thu May 22, 2008 3:44 pm

Hello Mr. Yaeger,

I'm here again with a request for you if you'll have some time to deal with this:

I have 2 INPUT files LRECL=80 both. The 1-st File has no duplicate values in it and the 2-nd one has duplicates.

INPUT 1:
DENIS01AAA
MARCO01AAA
PAOLO01AAA

INPUT 2:
DENIS01CCC
DENIS02CCC
DENIS03CCC
MARCO01CCC
MARCO02CCC
PAOLO01CCC
PAOLO02CCC
PAOLO03CCC
PAOLO04CCC
JOHN01CCC
JOHN02CCC
PETER01CCC
PETER02CCC
PETER03CCC


The 1-st OUTPUT should have all values that are present in 1-st INPUT repeted for how many times those are present in the 2-nd INPUT:

OUTPUT 1:
DENIS01AAA
DENIS02AAA
DENIS03AAA
MARCO01AAA
MARCO02AAA
PAOLO01AAA
PAOLO02AAA
PAOLO03AAA
PAOLO04AAA

The 2-nd OUTPUT should have all values that are not present in 1-st INPUT but exists in the 2-nd INPUT:

OUTPUT 2:
JOHN01CCC
JOHN02CCC
PETER01CCC
PETER02CCC
PETER03CCC

How can this can be done with ICETOOL or ICEMAN. Thank you very much in advance Mr. Yaeger. Hope you'll help me out.


Best regards
Denis Dhimitri
denis.dhimitri
 
Posts: 11
Joined: Sat Feb 09, 2008 9:11 pm
Has thanked: 0 time
Been thanked: 0 time

Re: ICETOOL/ICEMAN Help needed !

 

Re: ICETOOL/ICEMAN Help needed !

Postby skolusu » Thu May 22, 2008 11:29 pm

The following DFSORT/ICETOOL JCL will give you the desired results

//STEP0100 EXEC PGM=ICETOOL                                       
//TOOLMSG  DD SYSOUT=*                                           
//DFSMSG   DD SYSOUT=*                                           
//IN1      DD *
----+----1----+----2----+----3----+----4----+----5----+               
DENIS     01   AAA                                               
MARCO     01   AAA                                               
PAOLO     01   AAA                                               
//IN2      DD *                                                   
DENIS     01   CCC                                               
DENIS     02   CCC                                               
DENIS     03   CCC                                               
MARCO     01   CCC                                               
MARCO     02   CCC                                               
PAOLO     01   CCC                                               
PAOLO     02   CCC                                               
PAOLO     03   CCC                                               
PAOLO     04   CCC                                               
JOHN      01   CCC                                               
JOHN      02   CCC                                               
PETER     01   CCC                                               
PETER     02   CCC                                               
PETER     03   CCC                                               
//T1       DD DSN=&&T1,DISP=(MOD,PASS),SPACE=(CYL,(1,1),RLSE)     
//OUT1     DD SYSOUT=*                                           
//OUT2     DD SYSOUT=*
//TOOLIN   DD *                                       
  COPY FROM(IN1) USING(CTL1)                           
  COPY FROM(IN2) USING(CTL2)                           
  SPLICE FROM(T1) TO(OUT1) ON(1,10,CH) -               
  WITHALL WITH(01,80) KEEPBASE KEEPNODUPS USING(CTL3) 
//CTL1CNTL DD *                                       
  OUTFIL FNAMES=T1,BUILD=(1,10,70X'FF',1,10)           
//CTL2CNTL DD *                                       
  OUTFIL FNAMES=T1,OVERLAY=(81:10X)                   
//CTL3CNTL DD *                                       
  OUTFIL FNAMES=OUT1,BUILD=(01,80),                   
  INCLUDE=((1,10,CH,EQ,81,10,CH),AND,11,1,CH,NE,X'FF')
  OUTFIL FNAMES=OUT2,BUILD=(01,80),                   
  INCLUDE=(11,1,CH,NE,X'FF',AND,81,10,CH,EQ,C' ')     


The output for OUT1 is
DENIS     01   CCC
DENIS     02   CCC
DENIS     03   CCC
MARCO     01   CCC
MARCO     02   CCC
PAOLO     01   CCC
PAOLO     02   CCC
PAOLO     03   CCC
PAOLO     04   CCC


The output for OUT2 is
JOHN      01   CCC
JOHN      02   CCC
PETER     01   CCC
PETER     02   CCC
PETER     03   CCC
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

Re: ICETOOL/ICEMAN Help needed !

Postby denis.dhimitri » Fri May 23, 2008 4:07 pm

Thanks a lot for helping me Mr.Skolusu, the card you gave me worked fine. I appreciate it very much.

Best regards
Denis Dhimitri
denis.dhimitri
 
Posts: 11
Joined: Sat Feb 09, 2008 9:11 pm
Has thanked: 0 time
Been thanked: 0 time


Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post