Thread: ACCESSING POST GRESQL DATABASE THRU MFCOBOL

ACCESSING POST GRESQL DATABASE THRU MFCOBOL

From
vajjhala chakravarthi
Date:
HI

I am running MFcobol on a linux machine which is
having Postgresql. can I access pgsql database thru
mfcobol.
If it is possible where can I get odbc drivers and
what is the procedure help me

chakravarthi

________________________________________________________________________
Send free SMS using the Yahoo! Messenger. Go to http://in.mobile.yahoo.com/new/pc/


Re: ACCESSING POST GRESQL DATABASE THRU MFCOBOL

From
"scott.marlowe"
Date:
On Tue, 29 Jul 2003, vajjhala chakravarthi wrote:

> HI
> 
> I am running MFcobol on a linux machine which is
> having Postgresql. can I access pgsql database thru
> mfcobol.
> If it is possible where can I get odbc drivers and
> what is the procedure help me

ODBC driver is available here:

http://gborg.postgresql.org/project/psqlodbc/projdisplay.php

I'm not sure what to do after installing it though.  COBOL is not a 
language I've ever programmed in. 



Re: ACCESSING POST GRESQL DATABASE THRU MFCOBOL

From
"Merlin Moncure"
Date:
vajjhala wrote:
> HI
>
> I am running MFcobol on a linux machine which is
> having Postgresql. can I access pgsql database thru
> mfcobol.
> If it is possible where can I get odbc drivers and
> what is the procedure help me

This is probably not helpful, but FWIW I've written a driver for AcuCorp
AcuCobol that allows you to use postgres for backend storage instead of
the built in file system.  The driver maps cobol file statements (read,
etc.) to postgresql queries brokers the data to cobol native types.  If
you are interested I can give you more information.

This could be ported to any COBOL system if all of the following are
true:
1. Your cobol compiler allows calling of C programs via Call syntax with
parameters
2. Your compiler emits some type of parseable schema for your FD records
(would have to be adapted if different from AcuCorp's xfd syntax)
3. Your compiler allows substitution of an alternate file handler *OR*
you are willing to use CALL statements to do file I/O instead of
traditional cobol file/io statements.

It's widely thought that COBOL sucks, but when paired (properly) with a
robust SQL solution and written in a modern style it's not too bad.  It
mostly depends on how well you are able to integrate legacy cobol
programs with modern tools and technologies.  PostgreSQL has a number of
unique features that make it an ideal data repository for legacy COBOL
applications.

Merlin