[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [open-cobol-list] Sort utility within OC
From: |
David Essex |
Subject: |
Re: [open-cobol-list] Sort utility within OC |
Date: |
Fri, 25 May 2007 00:54:57 -0400 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722 |
Cris Schlehuber wrote:
> MF provides the mfsort utility for the sorting
> of flat files using a DFS*RT/Syncs*rt 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).
AFAIK, there is no open source SORT utility, as commonly found on
mainframes.
There are several closed source options for DOS, Win32 and even OS/2
(none for UN*X). For some of these, binaries can be downloaded for free.
Others are evaluation versions.
> 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
I had plans to write a mainframe like SORT utility program, but never
got around to finish it.
It would be modeled around mainframe products like Syncs*rt and CA-S*rt,
with similar functionality you have described above.
For example 'gsort -f syntax-file -i input-files -o output-file',
where the syntax-file could be as follows.
SORT FIELDS=(1,2,CH,A,59,4,CH,D)
*SORT FIELDS=copy
SUM FIELDS=(1,2,PD,59,4,BI,5,2,ZD)
RECORD=(F,219,V,12)
INCLUDE COND=(59,5,CH,EQ,C'Z008A',OR,
* 179,5,CH,LT,C'Z008B')
59,5,CH,NE,C'Z008B')
OUTREC FIELDS=(1,3,1,C' ',26,4,1,X'22')
OPTION=PRINTALL,STDERR
END
Part of the original plan was to integrate it with TC and/or OC.
In any case I only have most of the syntax (grammar) completed, but no
back end.
If any one has interest in pursuing this as a project, I would be glad
to release any code, that I do have, under the GPL/LGPL (2).
- [open-cobol-list] Sort utility within OC, schlehuberc, 2007/05/24
- Re: [open-cobol-list] Sort utility within OC, John R. Culleton, 2007/05/24
- Re: [open-cobol-list] Sort utility within OC - check out msort, Bob, 2007/05/24
- Re: [open-cobol-list] Sort utility within OC,
David Essex <=
- Re: [open-cobol-list] Sort utility within OC, Roger While, 2007/05/26
- Re: [open-cobol-list] Sort utility within OC, David Essex, 2007/05/26
- Re: [open-cobol-list] Sort utility within OC, Roger While, 2007/05/27
- Re: [open-cobol-list] Sort utility within OC, David Essex, 2007/05/27
- Re: [open-cobol-list] Sort utility within OC, John R. Culleton, 2007/05/27
- Re: [open-cobol-list] Sort utility within OC, David Essex, 2007/05/27
- Re: [open-cobol-list] Sort utility within OC, Roger While, 2007/05/28
- Re: [open-cobol-list] Sort utility within OC, David Essex, 2007/05/29