🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.cobol
Article #165

Re: help Looking for some code to do a Bubble sort in Cobol/Fortran

#165
From: Howard Brazee
Date: Mon, 29 Mar 1999 00:00
28 lines
1701 bytes
Jay Siegel wrote:
> 
> "space" == "spacesspaces" writes:
> 
> space> help       Looking for some code to do a "Bubble" sort in
> space> Cobol/Fortran
> space>
> space>
> space> have a need to sort some internal tables, multikey.
> space>
> space>
> space> thanks in advance
> space> ed
> space> .
> 
>     Bubble sort?  I'd recommend at least a Shell sort algorythm,
>     while the Fast sort algorythm is even faster.  The Bubble sort
>     algorythm is one of the slowest algorythms for sorting.
> 
> Jay

True.  But I am guessing about why a COBOL program needs to code a sort
at all.  I suspect it is for a very small amount of data, maybe to order
some data on a screen.  In that case, who cares which sort is faster. 
Just code which is easier (to maintain and avoid bugs).

Otherwise use a sort utility (external sort, COBOL sort, or SQL ordered
input).
Technical Details
Message-ID: <36FF8FFC.FE03B90D@NOSPAMhome.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <eQ3QQm4d#GA.333@upnetnews02.moswest.msn.net> <Q1.D1.412IAo9yMtq4soqs4.NR@nospam.nowhere>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10b578,e9c70a874c287770
X-Google-Attributes: gid10b578,public
X-Google-Thread: 10585b,e9c70a874c287770
X-Google-Attributes: gid10585b,public
X-Google-Thread: 10d15b,e9c70a874c287770
X-Google-Attributes: gid10d15b,public
From: Howard Brazee <brazee@NOSPAMhome.com>
Subject: Re: help       Looking for some code to do a Bubble sort in Cobol/Fortran
Date: 1999/03/29
Message-ID: <36FF8FFC.FE03B90D@NOSPAMhome.com>
X-Deja-AN: 460358174
Content-Transfer-Encoding: 7bit
References: <eQ3QQm4d#GA.333@upnetnews02.moswest.msn.net> <Q1.D1.412IAo9yMtq4soqs4.NR@nospam.nowhere>
Content-Type: text/plain; charset=us-ascii
Organization: University of Colorado at Boulder
Mime-Version: 1.0
Newsgroups: comp.lang.cobol,fj.comp.lang.cobol,fj.lang.cobol