MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What is the best way to sort 2 Million records

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities
View previous topic :: View next topic  
Author Message
moyeenkhan
Beginner


Joined: 04 Dec 2002
Posts: 64
Topics: 21

PostPosted: Wed Feb 16, 2011 12:04 pm    Post subject: What is the best way to sort 2 Million records Reply with quote

What is the best and efficient way to sort 2 million records. Do you think MAXSORT is the way to go?
Back to top
View user's profile Send private message Send e-mail
kolusu
Site Admin
Site Admin


Joined: 26 Nov 2002
Posts: 12369
Topics: 75
Location: San Jose

PostPosted: Wed Feb 16, 2011 12:09 pm    Post subject: Reply with quote

moyeenkhan,

Depends on lots of factors.

1. LRECL
2. RECFM
3. Length of the key to be sorted.
4. Format of the key to be sorted.
5. Availability of work datasets/Main storage....
_________________
Kolusu
www.linkedin.com/in/kolusu
Back to top
View user's profile Send private message Send e-mail Visit poster's website
papadi
Supermod


Joined: 20 Oct 2009
Posts: 594
Topics: 1

PostPosted: Wed Feb 16, 2011 1:42 pm    Post subject: Reply with quote

Several times a month i sort (well, not personally<g> - this is scheduled) between 8 and 10 million records that are more than 1k each (the whole record is used not a subset - see below). This typically runs in a few minutes. . .

One way to speed up a sort is if the sorted output does not need all of the data in the input records. A subset containing the sort-key(s) and needed data may run exponentially faster than sorting the whole set of data. Not only will this run faster but there will be less need for sortwork and output file dasd (which sometmes encounters space allocation problems).

Lots of times the entire set of data is sorted because it takes so little work to simply "sort it all". The process i mentioned earlier sorts the full data because the data as received is not in the correct sequence for most of the processing that uses this data.
_________________
All the best,

di
Back to top
View user's profile Send private message
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Feb 16, 2011 1:44 pm    Post subject: Reply with quote

moyeenkhan,

Which sort product are you using?

Have you tried sorting your 2 million records with a "normal" sort and run into a "problem"?

You really need to give more information before anyone can help you.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
moyeenkhan
Beginner


Joined: 04 Dec 2002
Posts: 64
Topics: 21

PostPosted: Wed Feb 16, 2011 2:26 pm    Post subject: Reply with quote

Many thanks for your time and response.

Here are moe details:
We have Syncsort
The input file is VB - 7508 Bytes
Sort Key details are
OPTION Y2PAST=1951
SORT FIELDS=(45,5,CH,A,94,2,CH,A,132,1,Y2D,A,133,2,PD,A)
RECORD TYPE=V,LENGTH=9674

Currently using MAXSORT
Back to top
View user's profile Send private message Send e-mail
Frank Yaeger
Sort Forum Moderator
Sort Forum Moderator


Joined: 02 Dec 2002
Posts: 1618
Topics: 31
Location: San Jose

PostPosted: Wed Feb 16, 2011 4:14 pm    Post subject: Reply with quote

I'm a DFSORT guy, not a Syncsort guy, but FWIW, I'd be surprised if MAXSORT was really needed for this. I would think that Syncsort could do this without MAXSORT.
_________________
Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Back to top
View user's profile Send private message Send e-mail Visit poster's website
moyeenkhan
Beginner


Joined: 04 Dec 2002
Posts: 64
Topics: 21

PostPosted: Wed Feb 16, 2011 5:19 pm    Post subject: Reply with quote

Thanks Frank. I also think I do not need MAXSORT.
Back to top
View user's profile Send private message Send e-mail
Bill Dennis
Advanced


Joined: 03 Dec 2002
Posts: 579
Topics: 1
Location: Iowa, USA

PostPosted: Wed Feb 16, 2011 10:59 pm    Post subject: Reply with quote

moyeenkhan,

MAXSORT is not for efficiency, it is for constrained SORTWORK space. The intermediate sort and merge phases require more resources. It is best reserved for sorting enormous files when the required work space cannot be allocated.
_________________
Regards,
Bill Dennis

Disclaimer: My comments on this foorum are my own and do not represent the opinions or suggestions of any other person or business entity.
Back to top
View user's profile Send private message
moyeenkhan
Beginner


Joined: 04 Dec 2002
Posts: 64
Topics: 21

PostPosted: Thu Feb 17, 2011 10:22 am    Post subject: Reply with quote

Thanks Bill.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Utilities All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group