Re: How should I preprocess my source file on GNU/Linux with GNUCobol for SQL Server?

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

 



Am 06.10.2018 um 21:01 schrieb gnucobol@xxxxxxxxxxxx:
> Hi all,
> 
> 
> I'm Oliver. I come from Strasbourg (France) and I recently study Cobol
> @school.

Hi Oliver and welcome to GnuCOBOL.

> As I have no budget for Windows, I start using Cobol on GNU/Linux.

It is reasonable to not use Windows for many reasons (even if you'd get
it in exchange of "only" your privacy and security)

> First it was awesome! I create PIC, SCREEN section, and make few things.

Good to hear.

> But now we start connecting to a MS SQL Server. If I can start SQL
> Server and do
> 
> ODBC connection on it with iSQL, it's another difficulty to make my code
> working
> 
> with EXEC SQL command.
> 
> 
> So my question is: what should I use to preprocess .cbl files with SQL
> commands
> 
> to connect to a SQL Server?

Depends on what your study uses. For COBOL you'd use in most cases EXEC
SQL (which does some setup and internal CALLs inserted by preprocessing)
some may prefer direct CALL to SQL libraries.

> 
> I found this http://www.kiska.net/opencobol/esql/index.html

Reasonable. I'm not 100% sure if this is up-to-date and would always go
to its home in the GnuCOBOL contributions:

https://sourceforge.net/p/open-cobol/contrib/HEAD/tree/trunk/esql/

> and installed esqlOC successfully. But some errors remains here:
> 
> https://github.com/blankoworld/cobol_menu/blob/master/Menu/Main.cbl

As you don't posted any actual error it is not that likely that others
can point you to a solution.
I suggest to ensure you use the most current ESQL version and if errors
remain then post the actual errors.

> Does anyone can do something with that or explain me how to use OpenESQL?

Obivously (or not?) you'd have to setup ODBC on your GNU/Linux
environment and get a working connection to a working SQL Server (not
100% sure about its current status on Linux OS, but if I remember
correctly this should be working at least for testing environments).

The link above includes a README, does this help already?

> Thank you in advance!

Welcome again,
Simon




[Index of Archives]     [Gcc Help]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Info]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux