Menu

#30 ooRexx v4 / DB2

closed
5
2012-08-14
2009-08-20
CaseyGV
No

We are testing the 64-bit version of ooRexx V4.0 on Windows Server 2008 with 64-bit DB2 V9.7 (and V9.5 - the behavior is the same) and are encoutering problems registering the modules needed to access DB2. We call a module that does the following prior to issuing any DB2 commands:
If rxFuncQuery('SQLDB2') \= 0 then ok = rxFuncAdd('SQLDB2','DB2AR','SQLDB2')
If ok <> 0 then do
Say "Error adding SQLDB2 environment"
Return 4
End

If rxFuncQuery('SQLDBS') \= 0 then ok = rxFuncAdd('SQLDBS','DB2AR','SQLDBS')
If ok <> 0 then do
Say "Error adding SQLDBS environment"
Return 4
End

If rxFuncQuery('SQLEXEC') \= 0 then ok = rxFuncAdd('SQLEXEC','DB2AR','SQLEXEC')
If ok <> 0 then do
Say "Error adding SQLEXEC environment"
Return 4
End

Return
We then issue a Call SQLDB2 command and supply the command we wish DB2 to perform. This code works fine with ooRexx v3.0.0 on a 32-bit Windows system going aginst DB2 V8. It fails on our 64-bit v4.0 environment with "Error adding SQLDB2 evironment."

I haven't found anything in IBM's documentation on where it is to pull these environments in from, so I don't know if perhaps we need to update our path on the system or something else simple like that. Has anyone else run into this issue and solved it ?

Thanks!

Discussion

  • Rick McGuire

    Rick McGuire - 2009-08-20

    The 64-bit ppRexx interpreter runs in a 64-bit process and can only load function libraries that are also compiled in 64-bit mode. Unfortunately, I don't believe that DB2 provides a 64-bit version of the Rexx interface. That's not a problem can be solved by the ooRexx team.

     
  • Rony G. Flatscher

    Have you tried the 32-Bit version of ooRexx 4.0.0?

    Other than that you might

    • ask IBM for a 64-Bit version of their external Rexx function package for DB2 (IBM might need to become aware of the fact that quite a few of their large customers deploy Rexx and that it is important for IBM to support their customer's Rexx support requests),

    • ask for a 64-Bit version of Mark Hessling's Rexx/SQL, which has DB2 support, cf. http://rexxsql.sourceforge.net/index.html,

    • if you "wait a little bit" you may consider to employ the upcoming 64-Bit version of BSF4Rexx 4.0 to take advantage of IBM's DB2 JDBC driver to gain full interfacing to/control over DB2.

    ---rony

     
  • OldManRiver

    OldManRiver - 2009-10-07

    All,

    I think this thread interesting as I have tried many times to install and use the RXSQL addon, to enable DBs for my REXX install, but have never been able to make it work.

    I still have not found a good INSTALL HOWTO for it, and the docs for it do not have an install section.

    OMR

     
  • mdlueck

    mdlueck - 2010-03-05

    The old IBM DB2 Rexx interface is quite good and rather unique... but sadly it is sort of abaondonware within IBM.

    The DB2 group only officially supports Object Rexx running on Linux, where as the Object Rexx team officially supported Windows and Linux was free "as is where is" sort of status.

    The IBM DB2 Rexx API uses old DB2 v2 calls, never was updated for the new DB2 UDB v5 API.

    I worked with it on an application where C/C++ code open and closes the DB connection and Rexx plugins are run by the C/C++ architecture, and have full access to DB2 piggybacking on the architecture's connection... thus no Rexx calls to open or close the connection... such is strictly forbidden in fact. I do not know if such would even be possible using the newer UDB specific API rather than the DB2 2.x API, but such capabilities are certainly slick. (For instance, for C/C++ to bring up a connection that Mark Hessling's RexxSQL library could piggy back on.)

     
  • Mark Miesfeld

    Mark Miesfeld - 2010-05-06

    Closing this the reason for the behavior and possible solutions have been well discussed.

     

Anonymous
Anonymous

Add attachments
Cancel