Narayana,

You are trying to build a SQL stored proc in the SPB. To build a SQL SP, you
need a C compiler installed on your machine, because the SPB internally
converts the SQL proc code to C code and then compiles it.

Install a C compiler on your machine.(usually most firms install Microsoft
Visual Studio, which comes with a C compiler).

Next, go to <db2_install_directory>\sqllib\function\routine\sr_cpath.bat -
and uncomment the first paragraph. Change the VCV6_DRIVE to the path where
your C compiler has been installed or where MS Visual Studio has been
installed. Save file. 

It should look something like this (except of course the path name on the
first line)

@echo off
set VCV6_DRIVE=c:\mydirectory\Microsoft Visual Studio
set
include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\includ
e;%VCV6_DRIVE%\VC98\include
set lib=%lib%;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_DRIVE%\VC98\lib
set
path=%path%;%VCV6_DRIVE%\Common\Tools\WinNT;%VCV6_DRIVE%\Common\MSDev98\Bin;
%VCV6_DRIVE%\Common\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%V
CV6_DRIVE%\VC98\lib

@echo off
REM set VCV5_DRIVE=c:\Program Files\devstudio
REM set
include=%include%;%VCV5_DRIVE%\vc\include;%VCV5_DRIVE%\vc\atl\include;%VCV5_
DRIVE%\vc\mfc\include
REM set lib=%lib%;%VCV5_DRIVE%\vc\lib;%VCV5_DRIVE%\vc\mfc\lib
REM set
path=%path%;%VCV5_DRIVE%\sharedide\bin\ide;%VCV5_DRIVE%\sharedide\bin;%VCV5_
DRIVE%\vc\bin


Try building your SP again. You should be fine.

HTH,
Abhijit



-----Original Message-----
From: Narayana Reddy Gandra [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 14, 2001 10:40 PM
To: [EMAIL PROTECTED]
Subject: DB2EUG: stored procedure builder


Hi all,
I am using stored procedure builder to build simple select statement to 
retrieve rows from the table and getting the following errors. Any help 
appreciated.

ADMINISTRATOR.PROC1 - Create stored procedure returns -7032.
ADMINISTRATOR.PROC1:
*** PREPCOMPILE 
D:\PROGRA~1\SQLLIB\function\routine\sqlproc\SAMPLE\ADMINISTRATOR\tmp\P211280
0.sqc
LINE    MESSAGES FOR P2112800.sqc
------  ---------------------------------------------------------------   
SQL0060W  The "C" precompiler is in progress.
   SQL0091W  Precompilation or binding was ended with "0" errors and "0" 
warnings.
*** COMPILE 
D:\PROGRA~1\SQLLIB\function\routine\sqlproc\SAMPLE\ADMINISTRATOR\tmp\P211280
0.c 
***
@echo off
REM set VCV6_DRIVE=c:\Microsoft Visual Studio
REM set 
include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\includ
e;%VCV6_DRIVE%\VC98\include
REM set lib=%lib%;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_DRIVE%\VC98\lib
REM set 
path=%path%;%VCV6_DRIVE%\Common\Tools\WinNT;%VCV6_DRIVE%\Common\MSDev98\Bin;
%VCV6_DRIVE%\Common\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%V
CV6_DRIVE%\VC98\lib
@echo off
REM set VCV5_DRIVE=c:\Program Files\devstudio
REM set 
include=%include%;%VCV5_DRIVE%\vc\include;%VCV5_DRIVE%\vc\atl\include;%VCV5_
DRIVE%\vc\mfc\include
REM set lib=%lib%;%VCV5_DRIVE%\vc\lib;%VCV5_DRIVE%\vc\mfc\lib
REM set 
path=%path%;%VCV5_DRIVE%\sharedide\bin\ide;%VCV5_DRIVE%\sharedide\bin;%VCV5_
DRIVE%\vc\bin
@echo on
set SQLROUTINE_FILENAME=P2112800
set db2path=D:\PROGRA~1\SQLLIB
nmake /f D:\PROGRA~1\SQLLIB\function\routine\sqlproc.mak
*** 
D:\PROGRA~1SQLLIB\function\routine\sqlproc\SAMPLE\ADMINISTRATOR\tmp\P2112800
.def 
***
LIBRARY P2112800
EXPORTS _pgsjmp@4
pgsjmp=_pgsjmp@4
D:\PROGRA~1\SQLLIB\function\routine\sqlproc\SAMPLE\ADMINISTRATOR\tmp>set 
SQLROUTINE_FILENAME=P2112800
D:\PROGRA~1\SQLLIB\function\routine\sqlproc\SAMPLE\ADMINISTRATOR\tmp>set 
db2path=D:\PROGRA~1\SQLLIB
D:\PROGRA~1\SQLLIB\function\routine\sqlproc\SAMPLE\ADMINISTRATOR\tmp>nmake 
/f D:\PROGRA~1\SQLLIB\function\routine\sqlproc.mak
The name specified is not recognized as an
internal or external command, operable program or batch file.
------------------------------------------------------------------------
SQL7032N  SQL procedure "PROC1" not created.  Diagnostic file is
"P2112800.log".  SQLSTATE=42904
ADMINISTRATOR.PROC1 - Build failed.
ADMINISTRATOR.PROC1 - Changes rolled back.


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to