Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

How to write duplicate records using sort utility

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
View previous topic :: :: View next topic  
Author Message
srinivasulu.p

New User


Joined: 10 Jul 2012
Posts: 22
Location: india

PostPosted: Wed Oct 10, 2012 5:26 pm    Post subject: How to write duplicate records using sort utility
Reply with quote

Hi, I am facing issue with the SORT utility while writing duplicate records into another file, using XSUM. please find the code below plz correct the code if is wrong.

Code:
//STEP1 EXEC PGM=SORT                           
//SYSOUT DD SYSOUT=*                             
//SORTIN DD DSN=E5470.TEST.FILE,DISP=SHR         
//SORTXSUM DD DSN=AE5470.TEST.FILE1,             
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSUT,
//           SPACE=(CYL,(1,5),RLSE),           
//            DCB=(RECFM=FB,LRECL=80,DSORG=PS)   
//SORTOUT DD SYSOUT=*                           
//SYSIN   DD *                                   
 SORT FIELDS=(1,3,CH,A)                       
 SUM FIELDS=NONE,XSUM                     
//


Error i am getting in spool :
---------------------------

Code:
ICE000I J - CONTROL STATEMENTS FOR 5740-SM1, DFSORT REL 14.0
             SORT FIELDS=(1,3,CH,A)                         
             SUM FIELDS=NONE,XSUM                           
                             $                               
ICE105A M INVALID SORT, MERGE, OR SUM STATEMENT OPERAND     
ICE052I J END OF DFSORT


Code'd
Back to top
View user's profile Send private message

Bill Woodger

DFSORT Moderator


Joined: 09 Mar 2011
Posts: 7254

PostPosted: Wed Oct 10, 2012 5:29 pm    Post subject: Reply to: How to write duplicate records using DFSORT utilit
Reply with quote

XSUM is a SyncSort thing, not DFSORT, which you are using.

Have a look at the Smart DFSORT Tricks to find out how to do XSUM and more.

Please also use the code tags next time.
Back to top
View user's profile Send private message
Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Wed Oct 10, 2012 9:21 pm    Post subject: Reply to: How to write duplicate records using sort utility
Reply with quote

srinivasulu.p,

use the following DFSORT/ICETOOL JCL

Code:

//STEP0100 EXEC PGM=ICETOOL                                         
//TOOLMSG  DD SYSOUT=*                                             
//DFSMSG   DD SYSOUT=*                                             
//SORTIN   DD DSN=E5470.TEST.FILE,DISP=SHR
//SORTXSUM DD DSN=AE5470.TEST.FILE1,             
//            DISP=(NEW,CATLG,DELETE),UNIT=SYSUT,
//            SPACE=(CYL,(1,5),RLSE)
//SORTOUT  DD SYSOUT=*                                             
//TOOLIN   DD *                                                     
  SELECT FROM(SORTIN) TO(SORTOUT) ON(1,3,CH) FIRST DISCARD(SORTXSUM)
//*
Back to top
View user's profile Send private message
srinivasulu.p

New User


Joined: 10 Jul 2012
Posts: 22
Location: india

PostPosted: Fri Oct 12, 2012 4:45 pm    Post subject: Re: Reply to: How to write duplicate records using sort util
Reply with quote

Thanq somuch Skolusu this code is working
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts TAPE VERIFY utility?? MrExtraordinare JCL & VSAM 3 Fri Dec 09, 2016 10:57 pm
No new posts Removing Duplicates based on certain ... chandracdac DFSORT/ICETOOL 8 Fri Dec 09, 2016 4:40 am
No new posts Limit duplicate records in the SORT pshongal SYNCSORT 6 Mon Nov 21, 2016 12:54 pm
No new posts How to convert the VBM file to VB or... Sulabh Agrawal JCL & VSAM 4 Fri Nov 18, 2016 1:04 pm
No new posts How to split the records using the am... vnktrrd DFSORT/ICETOOL 24 Fri Oct 28, 2016 7:33 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us