Good evening, people. I'm using OpenCobolIDE to operate in cobol on PC Windows 10. I discover that I can also operate with SQL, with .sqb files that, from what I understand, host queries, and, by means of appropriate CALL, to connect to a PostgreSQL DBMS, which I often use. I created a DB called "postgre" and tried to connect via OpenCobolIDE using the statement: call "PQconnectdb" using by reference "dbname = postgres" & x"00 returning pgconn. It gives me this error:
I think some library is missed (esqloc?). Can you help me? In the sense: can you tell me what to install and how to configure so that I can execute cobol statements that execute sql queries ?
Thank you in advance.
Vincent
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
Anonymous
-
2024-12-14
The .sqb files are files that are not pure COBOL but include EXEC SQL statements, which contain your queries. The preparser will be called automatically by OCIDE (otherwise your makefile/script will do so depending on the file extension) which will then change those to CALL statements.
Good evening, people. I'm using OpenCobolIDE to operate in cobol on PC Windows 10. I discover that I can also operate with SQL, with .sqb files that, from what I understand, host queries, and, by means of appropriate CALL, to connect to a PostgreSQL DBMS, which I often use. I created a DB called "postgre" and tried to connect via OpenCobolIDE using the statement: call "PQconnectdb" using by reference "dbname = postgres" & x"00 returning pgconn. It gives me this error:
libcob: pgcob.cbl: 21: cannot find module 'PQconnectdb'
I think some library is missed (esqloc?). Can you help me? In the sense: can you tell me what to install and how to configure so that I can execute cobol statements that execute sql queries ?
Thank you in advance.
Vincent
The .sqb files are files that are not pure COBOL but include
EXEC SQL
statements, which contain your queries. The preparser will be called automatically by OCIDE (otherwise your makefile/script will do so depending on the file extension) which will then change those toCALL
statements.And yes, on Windows its docs https://github.com/OpenCobolIDE/OpenCobolIDE/blob/master/doc/source/advanced.rst#sql-cobol-guide say it will call esqlOC, linking to [4057115f].
Related
Discussion: 4057115f