vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi All, We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also installed on this system. So, when i try to create SQL procedure, it says CC not found. So, I set the following compiler options.. 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib -R/export/home/db2inst1/sqllib/lib -ldb2" After setting this options, if i try to build the SQL procedure, it gives me.. DB2INST1.PROC1 - Create stored procedure returns -7032. DB2INST1.PROC1: -- LOG FILE P7535277.log FOR PROCEDURE DB2INST1.PROC1 -- DB2_SQLROUTINE_PREPOPTS= -- PREP/BIND MESSAGES FOR /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P7535277.sqc LINE MESSAGES FOR P7535277.sqc ------ -------------------------------------------------------------------- SQL0060W The "C" precompiler is in progress. SQL0091W Precompilation or binding was ended with "0" errors and "0" warnings. -- DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin -- DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -mt -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib -R/export/home/db2inst1/sqllib/lib -ldb2 -- CONTENTS OF /usr/local/bin ..9-g++^F\265\322$^Xsparc-sun-solaris2.9-gcc^F\265\322' unexpected -- END OF LOG FILE (SQLCODE: -7032) Please Can anyone tell me, Where i'm going wrong? Thanks in advance, Praveen |
| |||
| Praveen wrote: > Hi All, > > We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also > installed on this system. So, when i try to create SQL procedure, it > says CC not found. So, > I set the following compiler options.. > > 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2" > > After setting this options, if i try to build the SQL procedure, it > gives me.. > DB2INST1.PROC1 - Create stored procedure returns -7032. > > DB2INST1.PROC1: > -- LOG FILE P7535277.log FOR PROCEDURE DB2INST1.PROC1 > > -- DB2_SQLROUTINE_PREPOPTS= > > -- PREP/BIND MESSAGES FOR > /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P7535277.sqc > > LINE MESSAGES FOR P7535277.sqc > ------ -------------------------------------------------------------------- > SQL0060W The "C" precompiler is in progress. > SQL0091W Precompilation or binding was ended with "0" > errors and "0" warnings. > > -- DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > -- DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2 > > -- CONTENTS OF /usr/local/bin > > .9-g++^F\265\322$^Xsparc-sun-solaris2.9-gcc^F\265\322' unexpected > > -- END OF LOG FILE (SQLCODE: -7032) > > Please Can anyone tell me, Where i'm going wrong? > > Thanks in advance, > Praveen You did not check the DB2 documentation; read the fragment called "Setting Up the UNIX SQL Procedures Environment". ------------------------------------------------------------------------- The first time you compile a stored procedure, DB2 will generate the executable script file $HOME/sqllib/function/routine/sr_cpath (which contains the default values for the compiler environment variables). If the default values are not appropriate for your compiler, do one of the following: * edit the sr_cpath script file. * set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to contain the full path name of another executable script that specifies the desired settings. ------------------------------------------------------------------------- Jan M. Nelken |
| |||
| We don't test GCC and it's not officially supported. Not very helpful, but if no one else answers, there is an article on using GCC on Windows that may be useful to you: http://www-106.ibm.com/developerwork...306haungs.html Praveen wrote: > Hi All, > > We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also > installed on this system. So, when i try to create SQL procedure, it > says CC not found. So, > I set the following compiler options.. > > 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2" > > After setting this options, if i try to build the SQL procedure, it > gives me.. > DB2INST1.PROC1 - Create stored procedure returns -7032. > > DB2INST1.PROC1: > -- LOG FILE P7535277.log FOR PROCEDURE DB2INST1.PROC1 > > -- DB2_SQLROUTINE_PREPOPTS= > > -- PREP/BIND MESSAGES FOR > /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P7535277.sqc > > LINE MESSAGES FOR P7535277.sqc > ------ -------------------------------------------------------------------- > SQL0060W The "C" precompiler is in progress. > SQL0091W Precompilation or binding was ended with "0" > errors and "0" warnings. > > -- DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > -- DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2 > > -- CONTENTS OF /usr/local/bin > > .9-g++^F\265\322$^Xsparc-sun-solaris2.9-gcc^F\265\322' unexpected > > -- END OF LOG FILE (SQLCODE: -7032) > > Please Can anyone tell me, Where i'm going wrong? > > Thanks in advance, > Praveen |
| |||
| Praveen wrote: > Hi All, > > We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also > installed on this system. So, when i try to create SQL procedure, it > says CC not found. So, > I set the following compiler options.. > > 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2" The issue here is that you're using options for the Sun C++ compiler, but you are trying to compile with the gnu C++ (g++) compiler. (i.e. -xarch and -mt aren't valid options for g++). I'm not sure if the GNU compilers are supported on any platform besides Linux, but you could certainly try. The defaults for the DB2_SQLROUTINE_COMPILE_COMMAND are documented in the AppDev Guide: Building and Running Applications. Good luck, -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =----- |
| |||
| These aren't GCC compile settings. If you drop me an email at philipDOTnelsonATscottishwidowsDOTcoDOTuk (replacing DOT with . and AT with @) then I'll send you the correct values, which we have been using successfully on our AIX boxes for some time. The reason I'm asking for the email is so that I'll remember when I get to work in the morning. How did I work out what these were ? Well I saved the output from a build on Linux, where GCC is the default, and picked them out of that. I'm currently preparing a presentation for IDUG North America in May on DB2 environment variables, and setting up the variables to use GCC is one of the things I discuss. HTH Phil Nelson On Wed, 14 Jan 2004 04:39:35 -0800, Praveen wrote: > Hi All, > > We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also > installed on this system. So, when i try to create SQL procedure, it > says CC not found. So, > I set the following compiler options.. > > 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2" > > After setting this options, if i try to build the SQL procedure, it > gives me.. > DB2INST1.PROC1 - Create stored procedure returns -7032. > > DB2INST1.PROC1: > -- LOG FILE P7535277.log FOR PROCEDURE DB2INST1.PROC1 > > -- DB2_SQLROUTINE_PREPOPTS= > > -- PREP/BIND MESSAGES FOR > /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P7535277.sqc > > LINE MESSAGES FOR P7535277.sqc > ------ -------------------------------------------------------------------- > SQL0060W The "C" precompiler is in progress. > SQL0091W Precompilation or binding was ended with "0" > errors and "0" warnings. > > -- DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > -- DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -mt > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > -R/export/home/db2inst1/sqllib/lib -ldb2 > > -- CONTENTS OF /usr/local/bin > > .9-g++^F\265\322$^Xsparc-sun-solaris2.9-gcc^F\265\322' unexpected > > -- END OF LOG FILE (SQLCODE: -7032) > > Please Can anyone tell me, Where i'm going wrong? > > Thanks in advance, > Praveen |
| |||
| Hi Jan, Thanks for the response. Actually in sun machine GCC was installed and set the DB2_SQLROUTINE_COMPILE_COMMAND in sr_cpath file also. But still the same problem. Thanks, Praveen "Jan M. Nelken" <Unknown.User@Invalid.Domain> wrote in message news:<40054a38_2@news1.prserv.net>... > Praveen wrote: > > Hi All, > > > > We have installed DB2 UDB V8 on Sun SPARC 9. The GCC compiler also > > installed on this system. So, when i try to create SQL procedure, it > > says CC not found. So, > > I set the following compiler options.. > > > > 1. db2set DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > > > 2. db2set DB2_SQLROUTINE_COMPILE_COMMAND="cc -xarch=v8plusa -mt > > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > > -R/export/home/db2inst1/sqllib/lib -ldb2" > > > > After setting this options, if i try to build the SQL procedure, it > > gives me.. > > DB2INST1.PROC1 - Create stored procedure returns -7032. > > > > DB2INST1.PROC1: > > -- LOG FILE P7535277.log FOR PROCEDURE DB2INST1.PROC1 > > > > -- DB2_SQLROUTINE_PREPOPTS= > > > > -- PREP/BIND MESSAGES FOR > > /export/home/db2inst1/sqllib/function/routine/sqlproc/SAMPLE/DB2INST1/tmp/P7535277.sqc > > > > LINE MESSAGES FOR P7535277.sqc > > ------ -------------------------------------------------------------------- > > SQL0060W The "C" precompiler is in progress. > > SQL0091W Precompilation or binding was ended with "0" > > errors and "0" warnings. > > > > -- DB2_SQLROUTINE_COMPILER_PATH=/usr/local/bin > > > > -- DB2_SQLROUTINE_COMPILE_COMMAND=cc -xarch=v8plusa -mt > > -I/export/home/db2inst1/sqllib/include SQLROUTINE_FILENAME.c -G -o > > SQLROUTINE_FILENAME -L/export/home/db2inst1/sqllib/lib > > -R/export/home/db2inst1/sqllib/lib -ldb2 > > > > -- CONTENTS OF /usr/local/bin > > > > .9-g++^F\265\322$^Xsparc-sun-solaris2.9-gcc^F\265\322' unexpected > > > > -- END OF LOG FILE (SQLCODE: -7032) > > > > Please Can anyone tell me, Where i'm going wrong? > > > > Thanks in advance, > > Praveen > > You did not check the DB2 documentation; read the fragment called > "Setting Up the UNIX SQL Procedures Environment". > > ------------------------------------------------------------------------- > The first time you compile a stored procedure, DB2 will generate the > executable script file $HOME/sqllib/function/routine/sr_cpath (which > contains the default values for the compiler environment variables). If > the default values are not appropriate for your compiler, do one of the > following: > > * edit the sr_cpath script file. > * set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to > contain the full path name of another executable script that specifies > the desired settings. > > ------------------------------------------------------------------------- > > Jan M. Nelken |
| |||
| Blair Adamache <badamache@2muchspam.yahoo.com> writes: > We don't test GCC and it's not officially supported. I guess that the DB2 on Linux port sucks, then. -- Forte International, P.O. Box 1412, Ridgecrest, CA 93556-1412 Ronald Cole <ronald@forte-intl.com> Phone: (760) 499-9142 President, CEO Fax: (760) 499-9152 My GPG fingerprint: C3AF 4BE9 BEA6 F1C2 B084 4A88 8851 E6C8 69E3 B00B |
| |||
| DB2 on Linux is a fine product - at one point it was compiled with GCC (v6 and v7). It was available in beta and official support (GA) before Oracle. Its track record in production stretches back over 5 years. Computer science is dependent on math on math and math is dependent on logic. I would agree that no testing+no official support is less than ideal. Does (no testing+no official support)=sucks? I think that's stretching logic. I wish the best of luck to any customer or employee who depends on the logic shown in this thread by the "President, CEO" - heaven knows that luck can some times fill in where logic fails. Ronald Cole wrote: > Blair Adamache <badamache@2muchspam.yahoo.com> writes: > >>We don't test GCC and it's not officially supported. > > > I guess that the DB2 on Linux port sucks, then. > |
| ||||
| On Wed, 28 Jan 2004 23:21:58 -0500, Blair Adamache wrote: > at one point it was compiled with GCC (v6 and v7). Blair, I'm intrigued by this. So what do you use to build DB2 V8 for Linux, since GCC is the "standard" C compiler for this platform. Indeed GCC is the default compiler used to build stored procedures on the Linux platform (and therefore I'd assume supported for SPs on Linux). And if you've switched from GCC to some other compiler on Linux, what is the reason ? GCC is, from what I can gather, very highly regarded for both quality of object code produced and conforming to standards. Phil |