I downloaded the trial version of db2 v8.1 fp3 as well as the trial version of Ibm C v6.0 and IBM C++ v6.0 compiler, and installed them on our AIX v5.1 machine.
I created a database and can connect to it successfully as well as insert data into the database tables. But when I tried to CREATE PROCEDURE, I got the this error:
"P1550739.sqc", line 621.32: 1506-194 (S) Incomplete type is not allowed.
"P1550739.sqc", line 677.32: 1506-194 (S) Incomplete type is not allowed.
My compilation switches are as follows:
xlC_r -I/home/db2/sqllib/include P1550739.c -bE:P1550739.exp -e pgsjmp -o P1550739 -L/home/db2/sqllib/lib -ldb2
Any idea how to resolve this? I am sure it is my setup problem but I am not sure what. Hope you can help.
I have also tried with gcc but got this error:
P8224396.log:P8224396.sqc:621: storage size of `sql_setdlist' isn't known
P8224396.log:P8224396.sqc:677: storage size of `sql_setdlist' isn't known
the following scenario may be usefull to you
1) use DB2 Development Center to create/build/run/deploy stored proc
2) create a project
3) right click on connection object and select proparties
4) select sql build settings tab
5) specify the c++ environment variable .bat file in compiler environment text box for ex: if you are using VC++ C:\program files\Mircrosoft Visual studion\VC98\Bin\vcvars32.bat
that file contains the environment variable list of C++ compiler
so if you are using other compiler trace out the .bat file or create the batch file for environment variables.
I found the issue to my problem. Apparently my libraries are not properly sync up as a result installing additional components of db2 after I installed my fixpak. To over the issue, I re-install the fixpak and all is well now.