Skip to main content

Hello,

I am working on a trial version of Visual Cobol 8.0 since yesterday and I have a "homework" including PostGre database. I designed something very simple : a table "Individuals" whose columns are : first name, last name, birth date, creation timestamp, last update timestamp. I designed the table with pgAdmin 4.

Does someone designed a visual cobol program accessing this kind of database ? If not, did someone create a program with Oracle database access ?

My goal is to understand how precompilators work, how they replace SQL language by library calls (here, for Oracle or, better, PostGre). I used to work on Cobol batch programs with DB2 SQL, on Mainframe environment (z/OS), but the DB2 database, JCL, compilators, and so on, were already there. I didn't have to care about all this stuff because it was in the hand of database architects, mainframe architects, and so on.

Thank you for your help,

Didier

Hello,

I am working on a trial version of Visual Cobol 8.0 since yesterday and I have a "homework" including PostGre database. I designed something very simple : a table "Individuals" whose columns are : first name, last name, birth date, creation timestamp, last update timestamp. I designed the table with pgAdmin 4.

Does someone designed a visual cobol program accessing this kind of database ? If not, did someone create a program with Oracle database access ?

My goal is to understand how precompilators work, how they replace SQL language by library calls (here, for Oracle or, better, PostGre). I used to work on Cobol batch programs with DB2 SQL, on Mainframe environment (z/OS), but the DB2 database, JCL, compilators, and so on, were already there. I didn't have to care about all this stuff because it was in the hand of database architects, mainframe architects, and so on.

Thank you for your help,

Didier

There are several preprocessors available depending on what it is that you want to do and what type of code you are working with, managed or native?

OpenESQL is the Micro Focus preprocessor. It will take EXEC SQL calls and generate code depending on your executable format. If you are compiling to native code then it will compile to ODBC calls. If you are compiling to managed .NET it will generate code to access ADO.NET providers. If you are compiling to managed JVM it will generate code to access JDBC drivers. The type of code generated is controlled by a SQL directive DBMAN. You simply create a connection using the driver for your database and the source code is compatible to the different databases. There are several samples of using OpenESQL for all three of these driver types in the Samples Browser which can be accessed from the Windows Start menu under the Micro Focus Visual COBOL folder.

Pro*COBOL is the Oracle preprocessor which is part of the Oracle client. It works with native code and Oracle only and can preprocess your  programs either standalone or in conjunction with the Micro Focus COBSQL preprocessor. COBSQL allows you to debug your source code at the EXEC SQL level and not at the expanded preprocessed code level which is used when Pro*COBOL is used standalone. There are similar products for Sybase and Informix.

The DB2 preprocessor is available from IBM and works with the Micro Focus DB2 directive. This provides a level of compatibility with mainframe DB2 using DB2 LUW.

There are samples for all of these in the Samples Browser as mentioned above,

The documentation for database access is pretty extensive and can be found here.


Hello,

I am working on a trial version of Visual Cobol 8.0 since yesterday and I have a "homework" including PostGre database. I designed something very simple : a table "Individuals" whose columns are : first name, last name, birth date, creation timestamp, last update timestamp. I designed the table with pgAdmin 4.

Does someone designed a visual cobol program accessing this kind of database ? If not, did someone create a program with Oracle database access ?

My goal is to understand how precompilators work, how they replace SQL language by library calls (here, for Oracle or, better, PostGre). I used to work on Cobol batch programs with DB2 SQL, on Mainframe environment (z/OS), but the DB2 database, JCL, compilators, and so on, were already there. I didn't have to care about all this stuff because it was in the hand of database architects, mainframe architects, and so on.

Thank you for your help,

Didier

Didier, with cobol or Visual Cobol you can access all modern sql databases as mssql, oracle, db2, mysql, postgres, mariadb, etc.

There are any examples on the forum, and i can send you a little example working under Windows

You come from France? send me a private message!

cg


Didier, with cobol or Visual Cobol you can access all modern sql databases as mssql, oracle, db2, mysql, postgres, mariadb, etc.

There are any examples on the forum, and i can send you a little example working under Windows

You come from France? send me a private message!

cg

Can a program written in Visual COBOL PE access an SQLite database?

Thanks


Can a program written in Visual COBOL PE access an SQLite database?

Thanks

SQLite is not one of the database vendors that are directly supported in Visual COBOL. The list of databases that we support and test with can be found here:

That being said, if there is an ODBC 3.0 compliant driver available for SQLite then the chances are good that it should work.


SQLite is not one of the database vendors that are directly supported in Visual COBOL. The list of databases that we support and test with can be found here:

That being said, if there is an ODBC 3.0 compliant driver available for SQLite then the chances are good that it should work.

Thanks for the quick response Chris.


Can a program written in Visual COBOL PE access an SQLite database?

Thanks

Yes, this is possible and i can send you a Little exemple! Send me a private Message with email address!