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


From: David Essex
Subject: Re: [open-cobol-list] Sort utility within OC
Date: Fri, 25 May 2007 22:10:57 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1b) Gecko/20020722

Robert Moenck wrote:

> I read with interest your post on a Sort Utility for OpenCobol.
> This is a project I have considered as well.
> Maybe we can cooperate on something.

The modular concept I had in mind would be as follows.

1) Command line interface (C code)
- Used to set files names (input, output, syntax)
2) The SORT syntax (YACC/C code)
- Used to define sort, sum, input, output fields, etc.
3) Control (C code)
- It uses the SORT syntax and command line options to
    define a 'SORT structure' and choose an algorithm.
4) Back end sort utility library (C code)
- Where the actual SORT and field manipulation is done,
    using the 'SORT structure'

I have part 2 working, and about 80% completed.

Part 1 should not take very long to write.

The real work would be in parts 3-4. But existing code could be taken
from OC and/or TC and existing sort programs.


> I have used these Mainframe utilities (very slightly)
> and to my mind anyone porting a system from the Mainframe
> would be looking for this kind of capability.

True, but most COBOL commercial compilers include a SORT, JCL
conversion/emulators and other utilities.


> Maybe a first cut at the problem would be a Perl wrapper
> script around an existing sort program.

I think that approach would be problematic, in the long run.

First neither Perl or existing SORT programs have any facility to handle
mainframe (COBOL) data types.

I think it would be easier to start with a very basic SORT program, and
there many examples available on the NET, and build from there.

And finally Perl can be a problem an many platforms.
I had to (un)install about 5 different Win32 versions (builds), before I
found one which worked properly. And even so, the same script will run
faster on UN*X than Win32.

> You mention that you already have some code and I notice you
> are a member of Source Forge.
> Would setting up a project on Source Forge be a way to get
> the ball rolling?
> There is an existing project on Cobol Utilities, but it seems
> to be mainly a conduit for spam.

The Cobol Utilities project was setup for COBOL related projects.
So it would be the ideal place to host a SORT utility program.

I do not have administrator privileges for that SF project.
But I don't think it would be very difficult to get CVS commit (write)
access.

Unfortunately I do not have very much free time at the moment, so my
contribution to this project would be limited.


Cheers




reply via email to

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