|
View previous topic :: View next topic
|
| Author |
Message |
sandeep4u
New User
Joined: 12 Aug 2005 Posts: 32
|
|
|
|
Hi,
What is sortxsum? where it is used n how to use it?please give example..
regards,
sandeep |
|
| Back to top |
|
 |
Gautam512
Active User

Joined: 05 Oct 2005 Posts: 308 Location: Vizag / US
|
|
|
|
Hi Sandeep,
sortxsum is generally used to retrieve the records that were suppressed due to duplicates.
In the JCL a DD statement SORTXSUM for the dataset to store the suppressed records due to duplicates and in the SYSIN XSUM should be used.
There is a inter-link between sortxsum and xsum.
Ex : SUM FIELDS=NONE,XSUM
Hope Iam clear,
Gau |
|
| Back to top |
|
 |
vinodmaanju
New User
.jpg)
Joined: 10 May 2005 Posts: 28 Location: Pune
|
|
|
|
Hi,
Yes, I agree with Gautam. |
|
| Back to top |
|
 |
sandeep4u
New User
Joined: 12 Aug 2005 Posts: 32
|
|
|
|
Thanks Gautam.
Can you provide me a example or a document link so that i can clear it myself. |
|
| Back to top |
|
 |
nikyojin
New User

Joined: 05 Oct 2005 Posts: 94
|
|
|
|
Hi Sandeep4u,
| Code: |
//STEP002 EXEC PGM=SORT
//SYSPRINT DD SYSOUT=*
//SORTWK01 DD UNIT=WORK,SPACE=(TRK,(20,10),RLSE)
//SORTWK02 DD UNIT=WORK,SPACE=(TRK,(20,10),RLSE)
//SORTWK03 DD UNIT=WORK,SPACE=(TRK,(20,10),RLSE)
//SORTWK04 DD UNIT=WORK,SPACE=(TRK,(20,10),RLSE)
//SORTIN DD DSN=ALM.TESTS.CV.AIDCATG.NIK,
// DISP=SHR
//SORTOUT DD DSN=ALM.TESTS.CV.AIDCATG.NIK1,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE),
// DCB=(RECFM=FB,LRECL=10,DSORG=PS)
//SORTXSUM DD DSN=ALM.TESTS.CV.AIDCATG.NIK2,
// DISP=(NEW,CATLG,DELETE),
// UNIT=SYSDA,
// SPACE=(TRK,(10,5),RLSE),
// DCB=(RECFM=FB,LRECL=10,DSORG=PS)
//SYSOUT DD SYSOUT=*
//SYSIN DD *
SORT FIELDS=(1,7,CH,A)
SUM FIELDS=NONE,XSUM
/*
|
The above JCL provided is an example of SortXsum.
The Iput file is sorted on the bytes 1----7 and the i/p rec is wriitten into the o/p file denoted by SORTOUT.
In SYSIN it is mentioned SUM FIELDS=NONE,XSUM,
1) None :- indicates there should be no duplicate in the O/p
2) XSUM :- indicates the duplicate record should be mentioned in the file corresponding to SORTXSUM ddname;
Hence if 1----7 characters is name field and if the name is repeated twice in the i/p file the first rec after sorting will be put in the o/p file and the second rec goes to Xsum file.
Do inform me if any further information is required.... |
|
| Back to top |
|
 |
sandeep4u
New User
Joined: 12 Aug 2005 Posts: 32
|
|
|
|
thanks gautam.
It seem really very helpful...
thanks a lot
regards,
sandeep |
|
| Back to top |
|
 |
nikyojin
New User

Joined: 05 Oct 2005 Posts: 94
|
|
|
|
| Not Gautam....This is Nikhil over here....Do get back if u face any problems |
|
| Back to top |
|
 |
mjake
New User
Joined: 15 Feb 2006 Posts: 2
|
|
|
|
In the example given (JCL), is there a way to OMIT or SKIPREC some records from being processed in the XSUM?
Example:
Input file contains both Issue and cancel records.
(I)ssue records may be duplicated.
(C)ancel records that are duplicated cause an abend (long story).
I need to be able to exclude the Issue records from being sorted "out".
//SYSIN DD *
SORT FIELDS=(2,28,CH,A,1,1,CH,D),EQUALS
SUM FIELDS=NONE,XSUM
Any help will be greatly appreciated.
Thanks, |
|
| Back to top |
|
 |
|
|
 |
All times are GMT + 6 Hours |
|