Have GnuCobol cobc compiler installed in Ubuntu
esqlOC installed for SQL pre-processing, Cob-DB2 is working fine. For Cobol with postgres what should be the source program type (like .sqb is for Cob db2)
Presume a new DSN has to be added in data server driver config file with IP and port of Postgres
Asked
Active
Viewed 296 times
1

Laurenz Albe
- 209,280
- 17
- 206
- 263

Arun
- 21
- 2
-
What about this project? It seems to implement Embedded SQL in GunCOBOL. https://bigdanzblog.wordpress.com/2020/10/28/embedded-sql-for-gnucobol-using-ocesql/ https://github.com/opensourcecobol/Open-COBOL-ESQL – C.C. Hsu Nov 03 '20 at 03:24
1 Answers
0
There is no PostgreSQL preprocessor for embedded SQL in Cobol.
You should write the code that accesses the database in C and link the compiled C code with your Cobol program.
You can have embedded SQL in C for PostgreSQL using the ecpg
preprocessor that is included in PostgresSQL.

Laurenz Albe
- 209,280
- 17
- 206
- 263