I am trying to move procs from NT to AIX integration machine and am having problems compiling them. I have set the DB2_COMPILER variables as required but still can't create the procs on AIX. I get this message/error:

*** BIND /home/db2inst1/sqllib/function/routine/sqlproc/KEYLARGO/KEYLARGO/tmp/P3647480.sqc ***

LINE MESSAGES FOR P3647480.sqc
------ --------------------------------------------------------------------
SQL0060W The "C" precompiler is in progress.
SQL0091W Precompilation or binding was ended with "0"
errors and "0" warnings.

*** COMPILE /home/db2inst1/sqllib/function/routine/sqlproc/KEYLARGO/KEYLARGO/tmp/P3647480.c ***

db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/bin/cc
db2set DB2_SQLROUTINE_COMPILE_COMMAND=xlC_r -+ -H512 -T512 -I/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -bEQLROUTINE_FILENAME.exp -e SQLROUTINE_ENTRY -o SQLROUTINE_FILENAME -L/home/db2inst1/sqllib/lib -lc -ldb2

SQLROUTINE_FILENAME=P3647480
export SQLROUTINE_FILENAME
export SQLROUTINE_ENTRY=pgsjmp

xlC -I/home/db2inst1/sqllib/include P3647480.c -bE:P3647480.exp -e pgsjmp -o P3647480 -L/home/db2inst1/sqllib/lib -lc -ldb2

*** /home/db2inst1/sqllib/function/routine/sqlproc/KEYLARGO/KEYLARGO/tmp/P3647480.exp ***
pgsjmp

DB2SET processing complete, rc = -4400, SQLCODE = 0
DBI1302E Invalid parameter detected.

Explanation: An invalid parameter was used.

User Response: Use the -? option for the usage help message.


ld: 0706-006 Cannot find or open library file: -l m
ldpen(): A file or directory in the path name does not exist.

----------------------------------------------------------------------------