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

what is sortxsum?


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

New User


Joined: 12 Aug 2005
Posts: 32

PostPosted: Tue Jan 10, 2006 12:26 pm
Reply with quote

Hi,
What is sortxsum? where it is used n how to use it?please give example..


regards,

sandeep
Back to top
View user's profile Send private message
Gautam512

Active User


Joined: 05 Oct 2005
Posts: 308
Location: Vizag / US

PostPosted: Tue Jan 10, 2006 12:53 pm
Reply with quote

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
View user's profile Send private message
vinodmaanju

New User


Joined: 10 May 2005
Posts: 28
Location: Pune

PostPosted: Tue Jan 10, 2006 1:01 pm
Reply with quote

Hi,


Yes, I agree with Gautam.
Back to top
View user's profile Send private message
sandeep4u

New User


Joined: 12 Aug 2005
Posts: 32

PostPosted: Tue Jan 10, 2006 1:49 pm
Reply with quote

Thanks Gautam.

Can you provide me a example or a document link so that i can clear it myself.
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Tue Jan 10, 2006 2:47 pm
Reply with quote

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
View user's profile Send private message
sandeep4u

New User


Joined: 12 Aug 2005
Posts: 32

PostPosted: Tue Jan 10, 2006 3:54 pm
Reply with quote

thanks gautam.


It seem really very helpful...

thanks a lot


regards,

sandeep
Back to top
View user's profile Send private message
nikyojin

New User


Joined: 05 Oct 2005
Posts: 94

PostPosted: Tue Jan 10, 2006 4:33 pm
Reply with quote

Not Gautam....This is Nikhil over here....Do get back if u face any problems
Back to top
View user's profile Send private message
mjake

New User


Joined: 15 Feb 2006
Posts: 2

PostPosted: Wed Feb 15, 2006 10:34 pm
Reply with quote

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
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 find matching entries from SORTOUT fo... JCL & VSAM 6
No new posts Change the layout for SORTXSUM file JCL & VSAM 8
No new posts In sorting what is the use of XSUM/SO... JCL & VSAM 4
Search our Forums:

Back to Top