ooRexx 4.0.1 Linux not loading DB2 9.7 utils

2010-07-07
2012-08-14
  • Philip Wright
    Philip Wright
    2010-07-07

    I can not get Rexx to load the external DB2utilities. The following code:

    rc1=RxFuncAdd('SQLDBS','db2ar','SQLDBS');

    rc2=RxFuncAdd('SQLDB2','db2ar','SQLDB2');

    rc3=RxFuncAdd('SQLEXEC','db2ar','SQLEXEC');

    results in Return Code 1, and the following message:

    REX0043E: Error 43 running /home/pvwrght/db2rexx.rex line 18: Routine not
    found

    REX0417E: Error 43.1: Could not find routine "SQLEXEC"

    I am thinking that ooRexx isn't finding libdb2ar.so or something that should
    be in it.

    Thanks,

    Philip

     
  • David Ashley
    David Ashley
    2010-07-07

    This question has been answered many times. IBM distributes but no longer
    supports the Rexx interface to DB2. The big problem is that you MUST have a
    homogeneous environment that is ALL 32 bit for any linking to be possible
    between DB2 and Rexx. If any piece is 64 bit then you are out of luck, nothing
    will link.

    We have been working on a new oo interface based on ODBC. It is currently in
    our subversion incubator at /incubator.orxsql. It should be completely
    platform independent but it is barely in an alpha state as not a lot of
    testing has been done. But you are more than welcome to try it out.

    David Ashley

     
  • Philip Wright
    Philip Wright
    2010-07-07

    Thanks David. My CPU is a 32 bit AthlonXP, my Linux is 32 bit Fedora 13, my
    ooRexx is 32 bit and my DB2 is 32 bit. Am I missing something?

    Philip

     
  • David Ashley
    David Ashley
    2010-07-07

    Is libdb2ar.so in the /usr/lib or /lib subdirs? if not then you only choice it
    to perform the following prior to invoking your rexx script.

    export LD_LIBRARY_PATH=/path/to/subdir/containing/libdb2ar.so

    You may need to add additional subdirs to the above command if db2ar links to
    other libraries.

    David Ashley

     
  • Philip Wright
    Philip Wright
    2010-07-07

    Thanks David! That did the trick. I can now move all my old Rexx code from
    OS/2 to Linux.

    -Philip