dbTalk Databases Forums  

Simple disk-based sorting method

comp.databases comp.databases


Discuss Simple disk-based sorting method in the comp.databases forum.



Reply
 
Thread Tools Display Modes
  #31  
Old   
Lennart
 
Posts: n/a

Default Re: Simple disk-based sorting method - 07-05-2007 , 12:29 PM






Paul Linehan wrote:
Quote:
Citizen Bob wrote:

I have a disk file which contains 370,260 records of average length 60
ASCII text characters. I need to sort them on the first 9 characters,
which are set off from the rest by a space.

Once sorted the first record looks like
100100100 08:35-08:39 4 0 0 1 -115 -1 75 -100 dd17.txt
and the last one looks like
500900900 12:41-13:25 44 1 885 0 0 1 925 -200 dd21.txt


What's wrong with importing it into Excel?

What is the maximum number of rows in an XL sheet? Last time I checked
it was way less than 370,260.


/Lennart



Reply With Quote
  #32  
Old   
David Segall
 
Posts: n/a

Default Re: Simple disk-based sorting method - 07-06-2007 , 12:26 AM






spam (AT) uce (DOT) gov (Citizen Bob) wrote:

Quote:
I have a disk file which contains 370,260 records of average length 60
ASCII text characters. I need to sort them on the first 9 characters,
which are set off from the rest by a space.

Once sorted the first record looks like
100100100 08:35-08:39 4 0 0 1 -115 -1 75 -100 dd17.txt
and the last one looks like
500900900 12:41-13:25 44 1 885 0 0 1 925 -200 dd21.txt

There is not enough memory in my Win2K/SP4 system to implement the
traditional memory-based sorting algorithms, so I need to use a method
that is disk-file based. I have plenty of disk space.

I imagine that this method would open the input disk file and begin
reading records one at a time and performing some kind of sort
algorithm placing the result in a temporary output file. Once the
original file has been swept, the process starts over and runs again
and again for the required number of iterations until the entire list
is sorted in ascending order. I will implement this method in standard
DOS-based C (Microsoft Optimizing C Compiler "cl") using the Win2K
DVM.
I suggest you use the Microsoft supplied sort. You can obtain
instructions by typing HELP SORT at the command prompt.


Reply With Quote
  #33  
Old   
Paul Linehan
 
Posts: n/a

Default Re: Simple disk-based sorting method - 07-06-2007 , 05:05 AM






David Segall wrote:

Quote:
I suggest you use the Microsoft supplied sort. You can obtain
instructions by typing HELP SORT at the command prompt.


Or try downloading the bash shell at www.cygwin.com and
using the unix sort on windows.



Paul...



Reply With Quote
  #34  
Old   
Paul Linehan
 
Posts: n/a

Default Re: Simple disk-based sorting method - 07-06-2007 , 05:10 AM





Lennart wrote:

Quote:
What's wrong with importing it into Excel?

What is the maximum number of rows in an XL sheet? Last time I
checked it was way less than 370,260.

Oops - silly me! It's 65536.


www.cygwin.com could be a way of doing it. Or use perl
with cygwin. Or the Microsoftoft sort as suggested by another poster.



Paul...



Quote:
/Lennart


Reply With Quote
  #35  
Old   
David Segall
 
Posts: n/a

Default Re: Simple disk-based sorting method - 07-06-2007 , 01:21 PM



"Paul Linehan" <plinehan__A (AT) T__yahoo__D (DOT) OT__COM> wrote:

Quote:


David Segall wrote:

I suggest you use the Microsoft supplied sort. You can obtain
instructions by typing HELP SORT at the command prompt.



Or try downloading the bash shell at www.cygwin.com and
using the unix sort on windows.
Shame on you! That is not supplied by Microsoft. Everything you need
for shell level Unix is available free, and generally open source,
from Microsoft
<http://technet.microsoft.com/en-us/interopmigration/bb380242.aspx>.
It can be downloaded from
<http://www.microsoft.com/downloads/details.aspx?familyid=896c9688-601b-44f1-81a4-02878ff11778&displaylang=en>.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.