View previous topic :: View next topic
|
Author |
Message |
gilli
New User
Joined: 28 Aug 2004 Posts: 5
|
|
|
|
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 |
|
|
Ramya A
Active User
Joined: 26 Jul 2004 Posts: 104
|
|
|
|
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 |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Take note that XSUM is a unique feature of the SYNCSORT product ONLY. |
|
Back to top |
|
|
kris_chennai
New User
Joined: 19 Dec 2005 Posts: 7 Location: Chennai
|
|
|
|
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 |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
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 |
|
|
|