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
 

 

'XSUM' for copying the duplicate files

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: 'XSUM' for copying the duplicate files
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    Post subject:
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

Moderator Team Head


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

PostPosted: Tue Aug 31, 2004 8:13 pm    Post subject:
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    Post subject: Re: In jcl(sorting) there is an option 'XSUM'
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 Moderator


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

PostPosted: Fri Dec 23, 2005 8:54 pm    Post subject:
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 as discussed at:

http://www.ibm.com/servers/storage/support/software/sort/mvs/tricks/srtmst01.html#t12
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 -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
No new posts getting three output files out of JOI... migusd SYNCSORT 7 Mon Jun 05, 2017 11:30 pm
No new posts Using ICETOOL, how we can seperate th... bshkris SYNCSORT 5 Tue May 09, 2017 8:33 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm


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