Hello Phil,

I've had great success using the gcc compiler from GNU to build SQL stored
procedures on my DB2 UDB V7.2 Solaris machine, so I believe that it should
work on AIX as well. The most graceful way to persuade DB2 to compile SPs
with gcc is to set the DB2_SQLROUTINE_COMPILE_COMMAND registry variable.
Here is what mine looks like as an example:
DB2_SQLROUTINE_COMPILE_COMMAND=gcc  -G
-I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -o
SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib
-R/export/home/db2inst1/sqllib/lib -ldb2

I also needed to modify my PATH to ensure that gcc could be found by DB2.
It is possible to set this path temporarily from the
~/sqllib/function/routine/sr_cpath script. The script modifies the path
just long enough to build the SP, in case you're not happy about changing
your permanent PATH just to build SPs.

If you're curious, it is even possible to get the debugger in SP Builder to
step through SQL procs that were built with gcc, but I myself could only
get it to work when I connected from db2spb as the instance owner.

Hope this helps,

Fred Sobotka
Database Administrator
IBM Certified Solutions Expert - IBM DB2 UDB V7.1 Database Administration
for Unix, Linux, Windows, and OS/2
CollegeNET, Inc


-
:::  When replying to the list, please use 'Reply-All' and make sure
:::  a copy goes to the list ([EMAIL PROTECTED]).
***  To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
***  For more information, check http://www.db2eug.uni.cc

Reply via email to