Author Topic: DB2 WIN-OS2 ODBC and ReportSmith  (Read 5921 times)

Doug Clark

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +7/-1
    • View Profile
DB2 WIN-OS2 ODBC and ReportSmith
« on: August 17, 2019, 12:40:48 am »
Sean and I have been conversing through messenging on the site about DB2/2 and WinOS2 and IBM's WinOS2 CAE.

I wrote an article a number of years ago about databases and ODBC. In that article I said that the DB2 version 5 CAE for WinOS2 did not work very well, and that IBM had instituted a "2 versions back, 1 version forward" policy on CAEs and server versions. This meant that the DB2 version 2 WinOS2 CAE and ODBC driver, which works well in WinOS2, would not work connect with DB2 version 7. All of that, to the best of my knowledge, is still true.

I have discovered since then however what appears to be a work around for getting the version 5 DB2 CAE and ODBC driver for WinOS2 to work - which means you can connect from WinOS2 to DB2 version 7 - which is the last version of server released for OS/2.

The work around that appears to work is to install the DB2 version 5 CAE for Windows 3.1, connect to your database using the IBM WinOS2 Command Line Processor in a WinOS2 session, and leave the command line processor running and connected, before attempting to connection with any other application.

(This is an obvious issue when attempting to connect Windows 3.1 applications to DB2 in a seamless session. I think I have a work around for that also but it is not ready yet.)

The second issue Sean had was running ReportSmith in WinOS2 and connecting to DB2.  ReportSmith is, in my opinion, and excellent report writer, very cheap and readily available. It is bundled with Delphi versions 1 and 2 which you can pick up on ebay for $5 - $15. The trick in getting ReportSmith to connect to DB2 is to remove the word DB2 from the description of the driver in ODBC.INI and ODBCINST.INI located in C:\OS2\MDOS\WINOS2. I have attached my ODBC.INI and ODBCINST.INI to show how it is done. The thing to remember however is the IBM DB2 Client Setup won't work unless the DB2 is in the description. So get the client setup, THEN alter ODBC.INI and ODBCINST.INI.

Hope this helps Sean

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: DB2 WIN-OS2 ODBC and ReportSmith
« Reply #1 on: August 19, 2019, 09:00:56 pm »
Doug, I owe you another beer. 

I had given up getting ReportSmith to work w. DB2 after many attempts.  Unlike other ODBC data sources, Borland's documentation stated a DB2 gateway (OmniSQL MicroDecsionware, Gupta) was required to interface ReportSmith with DB2. 

Your ODBC on OS/2 articles are fabulous and have been my go-to source to get ODBC properly configured.   It would be nice to see you publish more in the future!

I had attempted to use the Win16 v5.2 CAE with DB2 6.1 with poor results, but I have had great success using the v2 CAE.  I don't have v7 DB2 for OS/2 (still looking), but I will be installing IBM's Small Business Suite for Linux which includes DB2 v7.1.  Once set up, I'll try your CLP trick and see if I have better results using the v5.2 CAE in Win-OS2.  IBM's DB2 v7 software announcement 201-128 discusses v7 server connectivity with 5.2 and 6.1 DB2 products and is silent on v2, so the v5.2 CAE will be my only option if I use a v7 server.  The v6.1 server running on Warp Server has been working great for my needs.

Doug Clark

  • Sr. Member
  • ****
  • Posts: 306
  • Karma: +7/-1
    • View Profile
Re: DB2 WIN-OS2 ODBC and ReportSmith
« Reply #2 on: August 20, 2019, 05:34:37 am »
  I don't have v7 DB2 for OS/2 (still looking), but I will be installing IBM's Small Business Suite for Linux which includes DB2 v7.1. .

Sean,

I am surprised you don't have version 7. IBM has made available a free version of DB2 since version 5 - it was called (in version 5, 6 and 7) Personal Edition.  IBM still provides a free version of DB2 (although not for OS/2), as does Oracle and Microsoft and I think Sybase. It isn't called personal edition anymore but it is a complete version and its only limitation (if I remember correctly) is in the size of the database.  What you don't get in any of the free versions is support - but that it to be expected.

I will find my copy in the (agh) basement and look again at the copyright stuff. But if it was free then, and they still release a free version, I don't see why it can't be posted on Hobbes. If anyone knows differently please let me know.

Sean Casey

  • Full Member
  • ***
  • Posts: 122
  • Karma: +2/-0
    • View Profile
Re: DB2 WIN-OS2 ODBC and ReportSmith
« Reply #3 on: August 20, 2019, 08:38:50 am »
I'll need to take closer look at the personal and even the developer versions to see if they can support remote network connections.  I assumed these were restricted to using only the loopback address.  I like to keep all my data/files/home directory on a (Warp) server separate from my varied client machines. 

v6 DB2 using the v2 CAE from Win-OS2 is working perfectly.  I'm now thrilled I can use ReportSmith with DB2, the final missing piece.  I prefer RS over Approach, Crystal and InfoMaker which are all fine and also easy to use, just not my preference.