Hi All,
I'm new to DB2, I have installed DB2 UDB V8 on Solaris machine. And i
tried to create a stored proc.But, gives the following error..
-- LOG FILE P2093405.log FOR PROCEDURE DB2INST1.PROC1
-- DB2_SQLROUTINE_PREPOPTS=
-- PREP/BIND MESSAGES FOR
/export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tm
p/P2093405.sqc
LINE MESSAGES FOR P2093405.sqc
------ --------------------------------------------------------------------
SQL0060W The "C" precompiler is in progress.
SQL0091W Precompilation or binding was ended with "0"
errors and "0" warnings.
-- DB2_SQLROUTINE_COMPILER_PATH=/export/home/db2inst1/sqllib/function/routine/sr_cpath
-- DB2_SQLROUTINE_COMPILE_COMMAND=gcc
-I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c
-shared -o SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib
-ldb2
-- CONTENTS OF /export/home/db2inst1/sqllib/function/routine/sr_cpath
#!/bin/sh
PATH=$PATH:/opt/SUNWspro/bin:/usr/local/bin
export PATH
db2set DB2_SQLROUTINE_COMPILE_COMMAND="gcc
-I/export/home/db2inst1/sqllib/include SQLROUTINE_FILEN
AME.c -shared -o SQLROUTINE_FILENAME
-L/export/home/db2inst1/sqllib/lib -ldb2"
-- CONTENTS OF /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P2093405.
sh
SQLROUTINE_FILENAME=P2093405
export SQLROUTINE_FILENAME
-- COMPILATION COMMAND:
gcc -I/export/home/db2inst1/sqllib/include P2093405.c -shared -o
P2093405 -L/export/home/db2inst
1/sqllib/lib -ldb2
-- CONTENTS OF /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P2093405.
exp
pgsjmp
-- COMPILATION MESSAGES FOR
/export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/
tmp/P2093405.c
DB2SET processing complete, rc = -4400, SQLCODE = 0
P2093405.c:14:21: sqladef.h: No such file or directory
P2093405.c:16: error: variable `sqla_rtinfo' has initializer but
incomplete type
P2093405.c:17: error: extra brace group at end of initializer
P2093405.c:17: error: (near initialization for `sqla_rtinfo')
P2093405.c:17: warning: excess elements in struct initializer
P2093405.c:17: warning: (near initialization for `sqla_rtinfo')
P2093405.c:17: error: `wchar_t' undeclared here (not in a function)
P2093405.c:17: warning: excess elements in struct initializer
P2093405.c:17: warning: (near initialization for `sqla_rtinfo')
P2093405.c:17: warning: excess elements in struct initializer
P2093405.c:17: warning: (near initialization for `sqla_rtinfo')
P2093405.c:17: error: extra brace group at end of initializer
When i searched in the forums, Someone told to check whether the
Application Development Client is installed or not. I have only one .h
file in my /export/home/db2inst1/sqllib/include directory. can anyone
please tell how to check whether it is installed or not in solaris
machine?
Thanks in advance,
Praveen