Re: Acucobol interface - Mailing list pgsql-hackers

From mlw
Subject Re: Acucobol interface
Date
Msg-id 3B1F6DAB.F6D1C3D@mohawksoft.com
Whole thread Raw
In response to Acucobol interface  (Roberto Fichera <robyf@tekno-soft.it>)
Responses Re: Re: Acucobol interface  (Roberto Fichera <kernel@tekno-soft.it>)
List pgsql-hackers
Roberto Fichera wrote:
> 
> Hi All,
> 
> I'm developing (currently in pre-alfa stage) a Acucobol interface for the
> Postgresql.
> The Acucobol runtime have a generic FS API interface that handle the work
> with the
> record oriented files, defining the open, close, read, write and so on low
> level function I can
> extend the runtime to talk with any file and database.
> 
> My current work translate each Acucobol FS command in a relative Postgresql
> query and
> the returned tuple will be translated in a record oriented view.
> After some performance tests I've notice that this path have much overhead
> and because
> this I was thinking to redesign the interface.
> 
> My first think was to bypass the SQL translation and use the Postgresql low
> level routines.
> I need to see the tables as record oriented archive, so I can scan
> sequentially (forward and
> backward) each record, lock/unlock it, insert and delete it and start to
> read the records with
> a match of a specific key.
> 
> Does anyone know where can I start to search/read/learn/study some
> document/code of the
> Postgresql low level routines ?
> 
> If need some detail, please ask ;-)!
> 
> Thanks in advance.
> 
> Roberto Fichera.

What you are looking for is a very powerful database back-end, as Tom Lane
suggests, something like Berkeley DB might do, but then what you want is a SQL
interface over that.

I am reticent to admit that I have done a little COBOL and the interface for
data paradigms is very good for a dBase like package. If you can live without a
client/server interface ala Postgres, and can live with a file based access
methodology, then what you want is doable.

I'm not aware what platform you wish to run your program, I am assuming
Windows. The old dBase format is currently being used under the name "xbase."
There are many libraries that conform to this file format and offer the type of
access which you wish to have. On top of that, there are ODBC drivers (in UNIX
and Windows, btw) for these xBase files.

You write acucobol extensions using some generic xbase access layer, and use
the ODBC xbase driver for applications like Access and Excel.

You'll have to sort out all the issues like concurrent access, and stuff like
that, but it should come pretty close to what you want to do.


pgsql-hackers by date:

Previous
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: Re: [SQL] behavior of ' = NULL' vs. MySQL vs. S tand ards
Next
From: Martín Marqués
Date:
Subject: Re: something smells bad