Splitting records using SORT



JES, JES2, JCL utilities, IDCAMS, Compile & Run JCLs, PROCs etc...

Splitting records using SORT

Postby Nary » Fri Oct 09, 2009 10:00 am

Hi,

I have a dataset which includes all the original records and duplicate records.
How do I separate original records and duplicate records and place them in two different datasets?

Thank you.
Nary.
Nary
 
Posts: 8
Joined: Mon Jun 22, 2009 7:00 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Splitting records using SORT

 

Re: Splitting records using SORT

Postby Balamurugan3 » Fri Oct 09, 2009 1:27 pm

Hi

think so this would be useful to you... some time back i was too searching for the same solution..... I got that from another forum...This is using utility ICETOOL ...

   
//STEP1    EXEC PGM=ICETOOL,REGION=1024K                       
//TOOLMSG  DD SYSOUT=*                                         
//DFSMSG  DD SYSOUT=*                                         
//IN   DD DSN=XXX.YYY.INPUT,DISP=SHR                 
//SORTXSUM  DD DSN=XXX.YYY.DUP,DISP=SHR                     
//OUT  DD DSN=XXX.YYY.OUTPUT,DISP=SHR               
//TOOLIN   DD *                                               
  SELECT FROM(IN) TO(OUT) ON(1,3,CH) FIRST DISCARD(SORTXSUM)   
/*                                                             


Here i have mentioned it with use of 1 key.. if so if your file has more than 1 key...

use it like

ON(1,3,CH) ON(4,2,CH)...FIRST DISCARD(SORTXSUM)
Many Thanks,
Bala
Balamurugan3
 
Posts: 17
Joined: Tue Sep 29, 2009 11:23 am
Has thanked: 0 time
Been thanked: 0 time


Return to JCL

 


  • Related topics
    Replies
    Views
    Last post