Menu

Start COBOL with SQL

Vincent
2024-12-14
2024-12-14
  • Vincent

    Vincent - 2024-12-14

    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

     
    • 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.

      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

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.