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

Equals option in sort


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
paduchuri

New User


Joined: 03 Jan 2011
Posts: 32
Location: Hyderabad

PostPosted: Tue May 24, 2011 9:20 pm
Reply with quote

Hi Every one,

Code:

SORT FIELDS=(1,6,CH,A),EQUALS
SUM FIELDS=NONE,XSUM         


I saw above code in my production control card,

some one please explain the functionality of the EQUALS option

I guess there is no need of using equals in above case.will in effect in the above case ? will the performence degrade in the above case?
Back to top
View user's profile Send private message
sqlcode1

Active Member


Joined: 08 Apr 2010
Posts: 577
Location: USA

PostPosted: Tue May 24, 2011 9:48 pm
Reply with quote

paduchuri,
Read about options here

Quote:
I guess there is no need of using equals in above case.will in effect in the above case ?
It may/can effect output. Run the same card with 2 input data shown below and observe output in each case.

However, looks like you have Syncsort installed at your shop.

Code:
AAAAAA01
AAAAAA02
AAAAAA03


Code:
AAAAAA03
AAAAAA02
AAAAAA01


Thanks,
Back to top
View user's profile Send private message
jerryte

Active User


Joined: 29 Oct 2010
Posts: 202
Location: Toronto, ON, Canada

PostPosted: Tue May 31, 2011 1:20 am
Reply with quote

The EQUALS option will ensure that if two or more records have the same sort key values then the order of those records is preserved. This could require extra processsing cost since it has to keep track of the order. Avoid it if possible.

In the sample code given the EQUALS will ensure that the first record of a matching set is kept while any other matching records are written to the XSUM dataset.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Tue May 31, 2011 2:59 am
Reply with quote

Hello,

Quote:
This could require extra processsing cost since it has to keep track of the order.
Very little additional cost is needed to do this. . .
Back to top
View user's profile Send private message
paduchuri

New User


Joined: 03 Jan 2011
Posts: 32
Location: Hyderabad

PostPosted: Tue May 31, 2011 2:18 pm
Reply with quote

Thanks for the information guys.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Need to set RC4 through JCL SORT DFSORT/ICETOOL 5
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts JCL sort card - get first day and las... JCL & VSAM 9
No new posts SCOPE PENDING option -check data DB2 2
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top