Home > front end >  Write data to sql server from Cobol
Write data to sql server from Cobol

Time:09-27

I am currently attempting to create a new application which uses sql as the backend database. This application will have standard CRUD functionality. The issue is I have another cobol application which has important information for my application.

I have tried looking at solutions but i cannot seem to find any working options.

My question is: how do i get live data from my cobol application into my sql server?

I know there are paid solutions to this, however i am wondering if there is any way to do this other than buying some companies software.

CodePudding user response:

The common way is to use some EXEC SQL preprocessor. Some rdbms still have their own (at least DB2 and Oracle), there are a bunch of "paid solutions" and there are also some "gratis" or even "free" solutions.

As you've explicit asked about SQL Server it seems you look for a solution working on COBOL for PC and an ODBC based solution would be most useful.

Two free software solutions that match are esqlOC and and GixSQL.
While those were originally created for GnuCOBOL, they should also work at least with Micro Focus COBOL (and if not should be able to made working with different COBOL environments for PC quite easy).

Many COBOL environments support handling any and/or specific files "externally" with the de-facto standard EXTFH, so as long as you find an EXTFH provider that provides SQL storage (or code that part on your own) this would be another option. Have a look at your specific COBOL documentation for more details.

Side note: different COBOL environments also provide the option to handle "plain COBOL files" (SELECT, FD, ...) to be stored in / received from database. Most of those are "additional paid" solutions.
(GnuCOBOL 4 comes with it for free, but that will only work if you use GnuCOBOL 4 - or use it as EXTFH target.)

  • Related