gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Sort utility within OC - check out msort


From: Bob
Subject: Re: [open-cobol-list] Sort utility within OC - check out msort
Date: Thu, 24 May 2007 23:57:20 -0400
User-agent: KMail/1.9.4

Cris,

I don't follow the syntax of the examples you gave, so I'm not certain 
what features you require from a sort utility, but there are two 
possibilities I can think of off-hand:

1) The standard Unix GNU sort does all the basics and is very fast.  One 
feature I miss is being able to sort fixed-length records (have to add 
linefeeds to each record using 'dd' command, perform sort, then remove 
them using 'dd' again).

2) GPL msort program has lots of features, including extensive Unicode, 
fixed-length records (or separated by any char you specify, even blocks), 
various sort methods (stable or unstable).  The author states on some 
informal testing he thinks its maybe 1/2 to 1/3 as fast as the standard 
Unix sort.  It also has an optional tcl/tk GUI.
http://www.billposer.org/Software/msort.html

Bob

------------------------------------
On Thursday 24 May 2007 5:16 pm, address@hidden wrote:
MicroFocus provides the mfsort utility for the sorting of flat files using 
a DFSORT/Syncsort type parameter.

The product I work with is batch in nature, and uses sort about 30 times, 
and will expand in the future.

I searched the mailing list and forum, but could not find any discussions 
about a sort utility.  My search for an open source equivelant did not 
come up with anything.
So, two questions.

1)  Does anyone know of an open source equivilent
2)  Has any discussion been made about an ocsort that could piggyback off 
of the implementation of the SORT verb.  (I've started to look at it, but 
I'm more of a COBOL programmer than a C).


A sample sort parm card, with some other statements.

use $DD_SORTIN record=(f,171)
 SORT FIELDS=(1,38,BI,A)
  OUTFIL
    give $DD_SORTOF1
  OUTFIL
    INCLUDE=(32,7,CH,EQ,C'0000101'),
    OUTREC=(1:1,20,
            21:21,4,
            C'-',
            26:25,2,
            C'-',
            29:27,2,
            31:29,143)
    give $DD_SORTOF2 record=(f,173)

OR


use $DD_SORTIN record=(f,698)
 SORT FIELDS=(619,40,CH,A,71,4,CH,A,65,2,CH,A,
              68,2,CH,A,361,16,CH,A,665,4,CH,A
              659,2,CH,A,662,2,CH,A,377,8,CH,A,
              385,19,CH,A)
 OUTREC FIELDS=(1:1,91,
                X'999C',
                94:94,605)
give $DD_SORTOUT



Thanks.

Cris Schlehuber



reply via email to

[Prev in Thread] Current Thread [Next in Thread]