Skip to main content

We are in the process to migrate 30 millons LOC written in Cobol Micro Focus using embedded SQL for Oracle, to use PostgreSQL database. We know that there are some open source pre compilers like gixsql, but we are interested in the official support from Micro Focus, is there a supported pre compiler for PostgreSQL?


#PostGRESQL
#precompliler

We are in the process to migrate 30 millons LOC written in Cobol Micro Focus using embedded SQL for Oracle, to use PostgreSQL database. We know that there are some open source pre compilers like gixsql, but we are interested in the official support from Micro Focus, is there a supported pre compiler for PostgreSQL?


#PostGRESQL
#precompliler

The preprocessor to use for PostGres is OpenESQL. It is part of Visual COBOL and Enterprise Developer (you didn't mention what version or platform you currently use)

https://www.microfocus.com/documentation/visual-cobol/vc90/EclUNIX/BKDBDBESQL.html 


The preprocessor to use for PostGres is OpenESQL. It is part of Visual COBOL and Enterprise Developer (you didn't mention what version or platform you currently use)

https://www.microfocus.com/documentation/visual-cobol/vc90/EclUNIX/BKDBDBESQL.html 

Hi Michael B for your quick answer. Sorry I forgot to mention that we are using Visual Cobol 6, but our intention is to start using version 9. I assume that OpenESQL works in both, that´s right?


Hi Michael B for your quick answer. Sorry I forgot to mention that we are using Visual Cobol 6, but our intention is to start using version 9. I assume that OpenESQL works in both, that´s right?

Hi Pablo,

Yes, OpenESQL is supported in both versions. You didn't mention what platform you are migrating to but OpenESQL supports ODBC for native code, ADO for managed .NET code and JDBC for managed JVM code. 

If you are migrating from an Oracle Pro*COBOL application to OpenESQL, you might run into some incompatibilities with SQL syntax and behavior. OpenESQL supports ANSI SQL and Pro*COBOL supports several Oracle specific extensions to SQL. The level of incompatibility depends completely on how you coded your Pro*COBOL applications. For managed .NET ADO programs, there is a PROCOB directive that provides a level of compatibility with Pro*COBOL but this is not supported for native code. To get an idea of what some of the differences are you can take a look at the PROCOB directive here.


Hi Pablo,

Yes, OpenESQL is supported in both versions. You didn't mention what platform you are migrating to but OpenESQL supports ODBC for native code, ADO for managed .NET code and JDBC for managed JVM code. 

If you are migrating from an Oracle Pro*COBOL application to OpenESQL, you might run into some incompatibilities with SQL syntax and behavior. OpenESQL supports ANSI SQL and Pro*COBOL supports several Oracle specific extensions to SQL. The level of incompatibility depends completely on how you coded your Pro*COBOL applications. For managed .NET ADO programs, there is a PROCOB directive that provides a level of compatibility with Pro*COBOL but this is not supported for native code. To get an idea of what some of the differences are you can take a look at the PROCOB directive here.

Hi  , thanks for your comments. 

Our code has more thant 30 years now, so it´s traditional Cobol sintax and yes, we already did some analysis and identified at least 30 different syntaxs we need to change in at least 1000 different programs with many ocurrences, so the work to be done is high.

Just to be completely sure, this OpenESQL supports syntax check and semantics check? Or we will only realize about a view/table that does not exists at runtime?

Thanks!


Hi  , thanks for your comments. 

Our code has more thant 30 years now, so it´s traditional Cobol sintax and yes, we already did some analysis and identified at least 30 different syntaxs we need to change in at least 1000 different programs with many ocurrences, so the work to be done is high.

Just to be completely sure, this OpenESQL supports syntax check and semantics check? Or we will only realize about a view/table that does not exists at runtime?

Thanks!

Yes, OpenESQL supports the CHECK directive which will cause the SQL statements to be sent to the database at compile time. Syntax checking for SQL statements is also done by the background parser when within the IDE editor. 


Yes, OpenESQL supports the CHECK directive which will cause the SQL statements to be sent to the database at compile time. Syntax checking for SQL statements is also done by the background parser when within the IDE editor. 

Ok, thanks for this hint of using this directive. Regarding syntax, as we do not program in any IDE, instead we use vim editor it´s useful in our case.

Which IDE you recommed?


Ok, thanks for this hint of using this directive. Regarding syntax, as we do not program in any IDE, instead we use vim editor it´s useful in our case.

Which IDE you recommed?

It depends on how and where you program. I assume you are running under Linux/Unix because you mentioned vim.

Visual COBOL supports 2 IDEs:
Visual Studio for Windows or .NET development and Eclipse on Windows or Eclipse on Linux.

Eclipse on Windows can be used locally or for remote development where the IDE runs under Windows and the source and programs reside on Linux/Unix. This also requires a copy of the DevHub product installed on the Linux/Unix side. We also have a version of the Eclipse product that can be installed directly on Linux.


It depends on how and where you program. I assume you are running under Linux/Unix because you mentioned vim.

Visual COBOL supports 2 IDEs:
Visual Studio for Windows or .NET development and Eclipse on Windows or Eclipse on Linux.

Eclipse on Windows can be used locally or for remote development where the IDE runs under Windows and the source and programs reside on Linux/Unix. This also requires a copy of the DevHub product installed on the Linux/Unix side. We also have a version of the Eclipse product that can be installed directly on Linux.

Yes  , we run on Linux/Unix, but we can code on different OS, including Windows in some cases. 

We do have DevHub installed and licensed, but we do not use Eclipse, for sure there is room for improvement in this case.

We still use the compiler and runtime in the same way we used to do with Server Express 5.1.


Yes, OpenESQL supports the CHECK directive which will cause the SQL statements to be sent to the database at compile time. Syntax checking for SQL statements is also done by the background parser when within the IDE editor. 

 Is OpenESQL any kind of branch of Open-COBOL-ESQL?

GitHub - opensourcecobol/Open-COBOL-ESQL: Open Cobol ESQL (ocesql) is an open-source Embedded SQL pre-compiler and run-time library designed for COBOL applications which access an open-source database.


No they are not related. Our OpenESQL is provided with the product and is an embedded preprocessor and run-time system.