IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

'XSUM' in SORT for copying the duplicates


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
gilli

New User


Joined: 28 Aug 2004
Posts: 5

PostPosted: Sat Aug 28, 2004 12:52 pm
Reply with quote

In jcl(sorting) there is an option 'xsum' for copying the duplicate files.
now what i want to know is
1) syntax for xsum
2) how to use it
3) please explain me with example.
Back to top
View user's profile Send private message
Ramya A

Active User


Joined: 26 Jul 2004
Posts: 104

PostPosted: Sat Aug 28, 2004 2:12 pm
Reply with quote

Hi,

1) Syntax for XSUM - SUM FIELDS=NONE,XSUM in the Sort card, and a DDNAME SORTXSUM to define the file for XSUM.

2) XSUM should be used when you have a case where the records from input file A should be copied to file B without duplicate records, and the eliminated duplicate records should be saved in a file C. Here file C will be the file for the DD name SORTXSUM.

3) Example:

JCL:
Code:

//STEP010 EXEC PGM=SORT                             
//SYSOUT   DD SYSOUT=*                                   
//SYSPRINT DD SYSOUT=*                                   
//SORTIN   DD DSN=TEST.XSUM.INPUT,DISP=SHR       
//SORTOUT  DD DSN=TEST.XSUM.OUTPUT,DISP=SHR     
//SORTXSUM DD DSN=TEST.XSUM.OUTPUT.XSUM,DISP=SHR
//SYSIN    DD *                                         
  SORT FIELDS=(2,10,CH,A)                               
  SUM FIELDS=NONE,XSUM                                   


Input file:

Code:

AAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAA
CCCCCCCCCCCCCCCCCCCCCCCCC
CDDDDDDDDDDDDDDDDCCCCCCCC
DDDDDDDDDDDDDDDDDDDDDDDDD


Output: Output without duplicate:
Code:

AAAAAAAAAAAAAAAAAAAAAAAAA
CCCCCCCCCCCCCCCCCCCCCCCCC
CDDDDDDDDDDDDDDDDCCCCCCCC


Output: Duplicate records alone (XSUM File)
Code:

AAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBBBBBBBBBBBB
DDDDDDDDDDDDDDDDDDDDDDDDD
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Aug 31, 2004 8:13 pm
Reply with quote

Take note that XSUM is a unique feature of the SYNCSORT product ONLY.
Back to top
View user's profile Send private message
kris_chennai

New User


Joined: 19 Dec 2005
Posts: 7
Location: Chennai

PostPosted: Fri Dec 23, 2005 8:36 pm
Reply with quote

can u pls suggest me how to get all duplicate records in SORTXSUM statement in SYNCSORT? I have been searching thru all the monuals..
Back to top
View user's profile Send private message
Frank Yaeger

DFSORT Developer


Joined: 15 Feb 2005
Posts: 7129
Location: San Jose, CA

PostPosted: Fri Dec 23, 2005 8:54 pm
Reply with quote

Quote:
Take note that XSUM is a unique feature of the SYNCSORT product ONLY.


That's true, but note that DFSORT can do the equivalent and more with the SELECT operator of ICETOOL.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts How to split large record length file... DFSORT/ICETOOL 8
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
No new posts how to calculate SUM value for VB fil... DFSORT/ICETOOL 1
No new posts how to calculate SUM for VB file usin... JCL & VSAM 1
Search our Forums:

Back to Top