Where Are All the Other SQL Connectios?

I inherited a substantial application written in Micro Focus COBOL.  I need to make changes to the way the connection strings are used.  I sniffed through the code - and found 22 (!) with CONNECT USING statements.  The application contains hundreds of programs, each compiled and deployed individually, with a handful of EXEC SQL statements - and as far as I can tell every one of them has no problem getting to the database.  How are all the other programs connecting?

  • 0  

    What SQL preprocessor are you using to precompile your code, OpenESQL (ODBC) or Oracle ProCOBOL?

    Once a connection is made then it stays in effect until it is disconnected. So if program1 does a CONNECT and then calls program2, program2 does not have to do a CONNECT.
    There are also implicit connection methods available:

         OpenESQL lusing SQL compiler directives, INIT, DB and PASS.
         ProCOBOL using option AUTO_CONNECT

    Chris Glazier
    Rocket Software - Principal Technical Support Specialist
    If you found this post useful, give it a “Like” or click on "Verify Answer" under the "More" button

  • 0 in reply to   

    in the ESODBCXA which executes as part of the startup of the application I spotted another CONNECT - that must be what establishes the connection