By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,756 Members | 1,745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,756 IT Pros & Developers. It's quick & easy.

How do I get DB2 to know I have a C compiler?

P: n/a
I'm getting soo frustrated...desperate...depressed...

Have installed DB2 v8.1.0.36

Been writing some stored procedures, and when trying to build them, I
can't get db2 to understand that I have Visual Studio 6.0 installed. If I
write 'nmake' or 'cl' on the command line it works fine, they are in the
path allright, but from DB2 DevCenter it's just not possible...

Even tried to copy the nmake prog to the dir where the C files are put,
and the it continues but stops on the 'cl' command...

This is what I get:

'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.

please help me...

pretty please...

Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a

"Willis" <me**********@hotmail.com> wrote in message
news:60******************************@localhost.ta lkaboutdatabases.com...
I'm getting soo frustrated...desperate...depressed...

Have installed DB2 v8.1.0.36

Been writing some stored procedures, and when trying to build them, I
can't get db2 to understand that I have Visual Studio 6.0 installed. If I
write 'nmake' or 'cl' on the command line it works fine, they are in the
path allright, but from DB2 DevCenter it's just not possible...

Even tried to copy the nmake prog to the dir where the C files are put,
and the it continues but stops on the 'cl' command...

This is what I get:

'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.

please help me...

pretty please...

I don't know how to make your C compiler work on your existing copy of DB2,
although others on this newsgroup may know.

However, if you don't get any useful suggestions, you may want to consider
upgrading to Stinger (V8.2) which is available now, at least in beta.
According to the Announcement Letter
(http://www-306.ibm.com/common/ssi/fc...a&infotype=an&
appname=iSource&supplier=877&letternum=ENUSZP04-0370#Header_3):

-----
SQL procedures no longer require a C or C++ compiler

Beginning with DB2 UDB V8.2, the creation of SQL procedures does not require
a C or C++ compiler on the server; therefore C or C++ compiler setup is not
required, neither on the server nor on the Development Center. When you
create an SQL procedure, its procedural statements are converted to a native
representation that is stored in the database catalogs, as it is done with
other SQL statements. When an SQL procedure is called, the native
representation is loaded from the catalogs and the DB2 engine executes the
procedure.

-----

Another possible solution which you may want to consider: use some other
language for your stored procedures. For instance, I've been writing stored
procedures in Java for a while and have had good results without having to
mess around much with my environment.

Rhino
Nov 12 '05 #2

P: n/a
There are environment variables that must be set. See the DB2
Application Development Guide: Building and Running Applications at

http://www-306.ibm.com/software/data...manualsv8.html

Larry Edelstein

Willis wrote:
I'm getting soo frustrated...desperate...depressed...

Have installed DB2 v8.1.0.36

Been writing some stored procedures, and when trying to build them, I
can't get db2 to understand that I have Visual Studio 6.0 installed. If I
write 'nmake' or 'cl' on the command line it works fine, they are in the
path allright, but from DB2 DevCenter it's just not possible...

Even tried to copy the nmake prog to the dir where the C files are put,
and the it continues but stops on the 'cl' command...

This is what I get:

'cl' is not recognized as an internal or external command,
operable program or batch file.
NMAKE : fatal error U1077: 'cl' : return code '0x1'
Stop.

please help me...

pretty please...


Nov 12 '05 #3

P: n/a
Willis,

As Rhino says, get to V8.2. Just get FP7. Don't waste your time dealing
with a problem that's being solved at the root.
FP7 is official and supported.

Cheers
Serge
Nov 12 '05 #4

P: n/a
In the Registry, the DB2_SQLROUTINE_COMPILER_PATH is set to where my
compiler is, i.e. C:\Program Files\Microsoft Visual Studio\VC98\Bin, and
when trying to compile in DevCenter I get the message

-- FAILED TO OPEN : C:\Program Files\Microsoft Visual Studio\VC98\Bin

I even tried to change the location to somewhere without spaces in the
path (never know with Windows...), but it made no difference...

Nov 12 '05 #5

P: n/a
What you need to set DB2_SQLROUTINE_COMPILER_PATH to is the location of a
batch file that sets up the compiler environment. On my system this is
C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat

Hope this helps,

Phil Castle

On Thu, 09 Sep 2004 05:35:21 -0400, Willis <me**********@hotmail.com>
wrote:
In the Registry, the DB2_SQLROUTINE_COMPILER_PATH is set to where my
compiler is, i.e. C:\Program Files\Microsoft Visual Studio\VC98\Bin, and
when trying to compile in DevCenter I get the message

-- FAILED TO OPEN : C:\Program Files\Microsoft Visual Studio\VC98\Bin

I even tried to change the location to somewhere without spaces in the
path (never know with Windows...), but it made no difference...


--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.