-
Create Procedure
Hi, Group ...
I'm a new user to DB2. I tried to create a stored procedure using Stored
Procedure Builder and faces some problems below :-
I tried to create a simple procedure but a face the message like this :-
CREATE PROCEDURE EQUITY.ProcTest ( )
LANGUAGE SQL
------------------------------------------------------------------------
-- SQL Stored Procedure
------------------------------------------------------------------------
P1: BEGIN
declare a integer;
declare b integer;
set a = 2;
set b = 5;
END P1
And the following messages :-
EQUITY.PROCTEST - Create stored procedure returns -7032.
EQUITY.PROCTEST:
*** PREPCOMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.sqc
***
LINE MESSAGES FOR P5548890.sqc
------ --------------------------------------------------------------------
SQL0060W The "C" precompiler is in progress.
SQL0091W Precompilation or binding was ended with "0"
errors and "0" warnings.
*** COMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.c
***
@echo off
REM set VCV6_DRIVE=c:\Microsoft Visual Studio
REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\include;%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%\C ommon\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_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=P5548890
set db2path=F:\MAYBANK2U\SQLLIB
nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
*** F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.def
***
LIBRARY P5548890
EXPORTS _pgsjmp@4
pgsjmp=_pgsjmp@4
F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set SQLROUTINE_FILENAME=P5548890
F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set db2path=F:\MAYBANK2U\SQLLIB
F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\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 "PROCTEST" not created. Diagnostic file is
"P5548890.log". SQLSTATE=42904
EQUITY.PROCTEST - Build failed.
EQUITY.PROCTEST - Changes rolled back.
Someone pls help...
Thank You Very Much..
Best Regrads..YC Choo
-
Re: Create Procedure
I had the same problem. You need to install c or c++ compiler for the SP Builder
to work.
-
Re: Create Procedure
The nmake.exe program can't be found.
Look at this line....
F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
The tmp> should be tmp\.
I hope this helps you.
"YC Choo" <ycchoo@iscpg.po.my> wrote:
>
>Hi, Group ...
>I'm a new user to DB2. I tried to create a stored procedure using Stored
>Procedure Builder and faces some problems below :-
>
>I tried to create a simple procedure but a face the message like this :-
>
>CREATE PROCEDURE EQUITY.ProcTest ( )
>LANGUAGE SQL
>------------------------------------------------------------------------
>-- SQL Stored Procedure
>------------------------------------------------------------------------
>P1: BEGIN
>declare a integer;
>declare b integer;
>set a = 2;
>set b = 5;
>END P1
>
>And the following messages :-
>
>
>EQUITY.PROCTEST - Create stored procedure returns -7032.
>
>EQUITY.PROCTEST:
>
>*** PREPCOMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.sqc
>***
>
>
>
>LINE MESSAGES FOR P5548890.sqc
>
>------ --------------------------------------------------------------------
>
>SQL0060W The "C" precompiler is in progress.
>
>SQL0091W Precompilation or binding was ended with "0"
>
>errors and "0" warnings.
>
>
>
>*** COMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.c
>***
>
>
>
>
>
>@echo off
>
>REM set VCV6_DRIVE=c:\Microsoft Visual Studio
>
>REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\include;%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%\C ommon\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_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=P5548890
>
>set db2path=F:\MAYBANK2U\SQLLIB
>
>
>
>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
>
>
>
>*** F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.def
>***
>
>LIBRARY P5548890
>
>EXPORTS _pgsjmp@4
>
>pgsjmp=_pgsjmp@4
>
>
>
>
>
>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set SQLROUTINE_FILENAME=P5548890
>
>
>
>
>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set db2path=F:\MAYBANK2U\SQLLIB
>
>
>
>
>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\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 "PROCTEST" not created. Diagnostic file is
>
>"P5548890.log". SQLSTATE=42904
>
>
>EQUITY.PROCTEST - Build failed.
>
>EQUITY.PROCTEST - Changes rolled back.
>
>
>Someone pls help...
>Thank You Very Much..
>Best Regrads..YC Choo
-
Re: Create Procedure
Okay, I'm having the same problem, but I didn't create the line that has the
problem. DB2 created it incorrectly, WHERE DO I FIX THIS ????
"Bill Gamboa" <bill@gamboa.com> wrote:
>
>The nmake.exe program can't be found.
>
>Look at this line....
>
>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
>
>The tmp> should be tmp\.
>
>I hope this helps you.
>
>
>
>"YC Choo" <ycchoo@iscpg.po.my> wrote:
>>
>>Hi, Group ...
>>I'm a new user to DB2. I tried to create a stored procedure using Stored
>>Procedure Builder and faces some problems below :-
>>
>>I tried to create a simple procedure but a face the message like this :-
>>
>>CREATE PROCEDURE EQUITY.ProcTest ( )
>>LANGUAGE SQL
>>------------------------------------------------------------------------
>>-- SQL Stored Procedure
>>------------------------------------------------------------------------
>>P1: BEGIN
>>declare a integer;
>>declare b integer;
>>set a = 2;
>>set b = 5;
>>END P1
>>
>>And the following messages :-
>>
>>
>>EQUITY.PROCTEST - Create stored procedure returns -7032.
>>
>>EQUITY.PROCTEST:
>>
>>*** PREPCOMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.sqc
>>***
>>
>>
>>
>>LINE MESSAGES FOR P5548890.sqc
>>
>>------ --------------------------------------------------------------------
>>
>>SQL0060W The "C" precompiler is in progress.
>>
>>SQL0091W Precompilation or binding was ended with "0"
>>
>>errors and "0" warnings.
>>
>>
>>
>>*** COMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.c
>>***
>>
>>
>>
>>
>>
>>@echo off
>>
>>REM set VCV6_DRIVE=c:\Microsoft Visual Studio
>>
>>REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\include;%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%\C ommon\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_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=P5548890
>>
>>set db2path=F:\MAYBANK2U\SQLLIB
>>
>>
>>
>>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
>>
>>
>>
>>*** F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.def
>>***
>>
>>LIBRARY P5548890
>>
>>EXPORTS _pgsjmp@4
>>
>>pgsjmp=_pgsjmp@4
>>
>>
>>
>>
>>
>>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set SQLROUTINE_FILENAME=P5548890
>>
>>
>>
>>
>>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set db2path=F:\MAYBANK2U\SQLLIB
>>
>>
>>
>>
>>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\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 "PROCTEST" not created. Diagnostic file is
>>
>>"P5548890.log". SQLSTATE=42904
>>
>>
>>EQUITY.PROCTEST - Build failed.
>>
>>EQUITY.PROCTEST - Changes rolled back.
>>
>>
>>Someone pls help...
>>Thank You Very Much..
>>Best Regrads..YC Choo
>
-
Re: Create Procedure
Bill Gamboa wrote:
> The nmake.exe program can't be found.
Correct
> F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
>
Look in F:\maybank2u\sqllib\function\routine for a file called sr_cpath.bat (or where-ever your sqllib.. etc path is)
You will need to edit the file to contain the correct path, include, lib variables, which you can derive from a similar batch file your compiler provides. Follow the rem'd out lines
as an example.
In theApplication Building Guide , under "Setting the SQL Procedures Environment"
you can read...
For SQL procedures support you have to install the Application Development Client and a DB2 supported C or C++ compiler on the server
[snip]
Configuring the Compiler Environment
To create SQL procedures, configure DB2 to use a supported C or C++ compiler on the server by the following steps:
[snip]
Set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to the executable file with the following command:
db2set DB2_SQLROUTINE_COMPILER_PATH=executable_file
where executable_file is the full path name for the C compiler environment file.
If you do not set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable, DB2 sets it to a default file. Depending on your operating system, this file will have one of the following
paths and file names:
[snip]
Windows:
%DB2PATH%\function\routine\sr_cpath.bat
You can use this default file as long as you modify it to reflect the settings required for the server operating system and the C or C++ compiler you are using. Note: On Windows NT and
Windows 2000, you do not have to set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable if you store the environment variables for your compiler as SYSTEM variables.
--Greg
> "YC Choo" <ycchoo@iscpg.po.my> wrote:
> >
> >Hi, Group ...
> >I'm a new user to DB2. I tried to create a stored procedure using Stored
> >Procedure Builder and faces some problems below :-
> >
> >I tried to create a simple procedure but a face the message like this :-
> >
> >CREATE PROCEDURE EQUITY.ProcTest ( )
> >LANGUAGE SQL
> >------------------------------------------------------------------------
> >-- SQL Stored Procedure
> >------------------------------------------------------------------------
> >P1: BEGIN
> >declare a integer;
> >declare b integer;
> >set a = 2;
> >set b = 5;
> >END P1
> >
> >And the following messages :-
> >
> >
> >EQUITY.PROCTEST - Create stored procedure returns -7032.
> >
> >EQUITY.PROCTEST:
> >
> >*** PREPCOMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.sqc
> >***
> >
> >
> >
> >LINE MESSAGES FOR P5548890.sqc
> >
> >------ --------------------------------------------------------------------
> >
> >SQL0060W The "C" precompiler is in progress.
> >
> >SQL0091W Precompilation or binding was ended with "0"
> >
> >errors and "0" warnings.
> >
> >
> >
> >*** COMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.c
> >***
> >
> >
> >
> >
> >
> >@echo off
> >
> >REM set VCV6_DRIVE=c:\Microsoft Visual Studio
> >
> >REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\include;%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%\C ommon\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_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=P5548890
> >
> >set db2path=F:\MAYBANK2U\SQLLIB
> >
> >
> >
> >nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
> >
> >
> >
> >*** F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.def
> >***
> >
> >LIBRARY P5548890
> >
> >EXPORTS _pgsjmp@4
> >
> >pgsjmp=_pgsjmp@4
> >
> >
> >
> >
> >
> >F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set SQLROUTINE_FILENAME=P5548890
> >
> >
> >
> >
> >F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set db2path=F:\MAYBANK2U\SQLLIB
> >
> >
> >
> >
> >F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\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 "PROCTEST" not created. Diagnostic file is
> >
> >"P5548890.log". SQLSTATE=42904
> >
> >
> >EQUITY.PROCTEST - Build failed.
> >
> >EQUITY.PROCTEST - Changes rolled back.
> >
> >
> >Someone pls help...
> >Thank You Very Much..
> >Best Regrads..YC Choo
-
Re: Create Procedure
Thanks Greg, I had seen that, I thought UDB was generating the statement incorrectly.
After looking at your response, and updating the file I now have created
a UDB Stored Procedure.
Thanks Much
KlK
Greg Nash <gnash@namoicotton.com.au> wrote:
>
>
>Bill Gamboa wrote:
>
>> The nmake.exe program can't be found.
>
>Correct
>
>> F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
>>
>
>Look in F:\maybank2u\sqllib\function\routine for a file called sr_cpath.bat
(or where-ever
>your sqllib.. etc path is)
>
>You will need to edit the file to contain the correct path, include, lib
variables,
>which you can derive from a similar batch file your compiler provides.
Follow the
>rem'd out lines
>as an example.
>
>In theApplication Building Guide , under "Setting the SQL Procedures Environment"
>you can read...
>
>For SQL procedures support you have to install the Application Development
Client and
>a DB2 supported C or C++ compiler on the server
>[snip]
>Configuring the Compiler Environment
>
>To create SQL procedures, configure DB2 to use a supported C or C++ compiler
on the
>server by the following steps:
>[snip]
>
>Set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to the executable
file with
>the following command:
> db2set DB2_SQLROUTINE_COMPILER_PATH=executable_file
>
>where executable_file is the full path name for the C compiler environment
file.
>
>If you do not set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable,
DB2 sets it
>to a default file. Depending on your operating system, this file will have
one of the
>following
>paths and file names:
>[snip]
>
>Windows:
>%DB2PATH%\function\routine\sr_cpath.bat
>You can use this default file as long as you modify it to reflect the settings
required
>for the server operating system and the C or C++ compiler you are using.
Note: On Windows
>NT and
>Windows 2000, you do not have to set the DB2_SQLROUTINE_COMPILER_PATH DB2
registry variable
>if you store the environment variables for your compiler as SYSTEM variables.
>
>--Greg
>
>> "YC Choo" <ycchoo@iscpg.po.my> wrote:
>> >
>> >Hi, Group ...
>> >I'm a new user to DB2. I tried to create a stored procedure using Stored
>> >Procedure Builder and faces some problems below :-
>> >
>> >I tried to create a simple procedure but a face the message like this
:-
>> >
>> >CREATE PROCEDURE EQUITY.ProcTest ( )
>> >LANGUAGE SQL
>> >------------------------------------------------------------------------
>> >-- SQL Stored Procedure
>> >------------------------------------------------------------------------
>> >P1: BEGIN
>> >declare a integer;
>> >declare b integer;
>> >set a = 2;
>> >set b = 5;
>> >END P1
>> >
>> >And the following messages :-
>> >
>> >
>> >EQUITY.PROCTEST - Create stored procedure returns -7032.
>> >
>> >EQUITY.PROCTEST:
>> >
>> >*** PREPCOMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.sqc
>> >***
>> >
>> >
>> >
>> >LINE MESSAGES FOR P5548890.sqc
>> >
>> >------ --------------------------------------------------------------------
>> >
>> >SQL0060W The "C" precompiler is in progress.
>> >
>> >SQL0091W Precompilation or binding was ended with "0"
>> >
>> >errors and "0" warnings.
>> >
>> >
>> >
>> >*** COMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.c
>> >***
>> >
>> >
>> >
>> >
>> >
>> >@echo off
>> >
>> >REM set VCV6_DRIVE=c:\Microsoft Visual Studio
>> >
>> >REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\include;%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%\C ommon\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_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=P5548890
>> >
>> >set db2path=F:\MAYBANK2U\SQLLIB
>> >
>> >
>> >
>> >nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
>> >
>> >
>> >
>> >*** F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.def
>> >***
>> >
>> >LIBRARY P5548890
>> >
>> >EXPORTS _pgsjmp@4
>> >
>> >pgsjmp=_pgsjmp@4
>> >
>> >
>> >
>> >
>> >
>> >F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set SQLROUTINE_FILENAME=P5548890
>> >
>> >
>> >
>> >
>> >F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set db2path=F:\MAYBANK2U\SQLLIB
>> >
>> >
>> >
>> >
>> >F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake /f
F:\MAYBANK2U\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 "PROCTEST" not created. Diagnostic file is
>> >
>> >"P5548890.log". SQLSTATE=42904
>> >
>> >
>> >EQUITY.PROCTEST - Build failed.
>> >
>> >EQUITY.PROCTEST - Changes rolled back.
>> >
>> >
>> >Someone pls help...
>> >Thank You Very Much..
>> >Best Regrads..YC Choo
>
>
><!doctype html public "-//w3c//dtd html 4.0 transitional//en">
><html>
>Bill Gamboa wrote:
><blockquote TYPE=CITE>The nmake.exe program can't be found.</blockquote>
>Correct
><blockquote TYPE=CITE>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake
>/f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
><br>*</blockquote>
>Look in F:\maybank2u\sqllib\function\routine for a file called sr_cpath.bat**
>(or where-ever your sqllib.. etc path is)
><p>You will need to edit the file to contain the correct path, include,
>lib variables, which you can derive from a similar batch file your compiler
>provides.* Follow the rem'd out lines as an example.
><p>In theApplication Building Guide , under "Setting the SQL Procedures
>Environment"
><br>you can read...
><p>For SQL procedures support you have to install the Application Development
>Client and a DB2 supported C or C++ compiler on the server
><br>[snip]
><br>Configuring the Compiler Environment
><p>To create SQL procedures, configure DB2 to use a supported C or C++
>compiler on the server by the following steps:
><br>[snip]
><p>Set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable to the executable
>file with the following command:
><br>** db2set DB2_SQLROUTINE_COMPILER_PATH=executable_file
><p>where executable_file is the full path name for the C compiler environment
>file.
><p>If you do not set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable,
>DB2 sets it to a default file. Depending on your operating system, this
>file will have one of the following paths and file names:
><br>[snip]
><p>Windows:
><br>%DB2PATH%\function\routine\sr_cpath.bat
><br><b>You can use this default file as long as you modify it to reflect
>the settings required for the server operating system and the C or C++
>compiler you are using.</b> Note: On Windows NT and Windows 2000, you do
>not have to set the DB2_SQLROUTINE_COMPILER_PATH DB2 registry variable
>if you store the environment variables for your compiler as SYSTEM variables.
><p>--Greg
><blockquote TYPE=CITE>"YC Choo" <ycchoo@iscpg.po.my> wrote:
><br>>
><br>>Hi, Group ...
><br>>I'm a new user to DB2. I tried to create a stored procedure using
>Stored
><br>>Procedure Builder and faces some problems below :-
><br>>
><br>>I tried to create a simple procedure but a face the message like this
>:-
><br>>
><br>>CREATE PROCEDURE EQUITY.ProcTest ( )
><br>>LANGUAGE SQL
><br>>------------------------------------------------------------------------
><br>>-- SQL Stored Procedure
><br>>------------------------------------------------------------------------
><br>>P1: BEGIN
><br>>declare a integer;
><br>>declare b integer;
><br>>set a = 2;
><br>>set b = 5;
><br>>END P1
><br>>
><br>>And the following messages :-
><br>>
><br>>
><br>>EQUITY.PROCTEST - Create stored procedure returns -7032.
><br>>
><br>>EQUITY.PROCTEST:
><br>>
><br>>*** PREPCOMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.sqc
><br>>***
><br>>
><br>>
><br>>
><br>>LINE MESSAGES FOR P5548890.sqc
><br>>
><br>>------ --------------------------------------------------------------------
><br>>
><br>>SQL0060W The "C" precompiler is in progress.
><br>>
><br>>SQL0091W Precompilation or binding was ended with "0"
><br>>
><br>>errors and "0" warnings.
><br>>
><br>>
><br>>
><br>>*** COMPILE F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.c
><br>>***
><br>>
><br>>
><br>>
><br>>
><br>>
><br>>@echo off
><br>>
><br>>REM set VCV6_DRIVE=c:\Microsoft Visual Studio
><br>>
><br>>REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\mfc\include;%VCV6_DRIVE% \VC98\include
><br>>
><br>>REM set lib=%lib%;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_DRIVE%\VC98\lib
><br>>
><br>>REM set path=%path%;%VCV6_DRIVE%\Common\Tools\WinNT;%VCV6_DRIVE%\Common\MSDev98\Bin;%VCV6_DRIVE%\C ommon\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_DRIVE%\VC98\lib
><br>>
><br>>
><br>>
><br>>@echo off
><br>>
><br>>REM set VCV5_DRIVE=c:\Program Files\devstudio
><br>>
><br>>REM set include=%include%;%VCV5_DRIVE%\vc\include;%VCV5_DRIVE%\vc\atl\include;%VCV5_DRIVE%\vc\mfc\ include
><br>>
><br>>REM set lib=%lib%;%VCV5_DRIVE%\vc\lib;%VCV5_DRIVE%\vc\mfc\lib
><br>>
><br>>REM set path=%path%;%VCV5_DRIVE%\sharedide\bin\ide;%VCV5_DRIVE%\sharedide\bin;%VCV5_DRIVE%\vc\bin
><br>>
><br>>
><br>>
><br>>
><br>>
><br>>@echo on
><br>>
><br>>set SQLROUTINE_FILENAME=P5548890
><br>>
><br>>set db2path=F:\MAYBANK2U\SQLLIB
><br>>
><br>>
><br>>
><br>>nmake /f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
><br>>
><br>>
><br>>
><br>>*** F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp\P5548890.def
><br>>***
><br>>
><br>>LIBRARY P5548890
><br>>
><br>>EXPORTS _pgsjmp@4
><br>>
><br>>pgsjmp=_pgsjmp@4
><br>>
><br>>
><br>>
><br>>
><br>>
><br>>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set SQLROUTINE_FILENAME=P5548890
><br>>
><br>>
><br>>
><br>>
><br>>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>set db2path=F:\MAYBANK2U\SQLLIB
><br>>
><br>>
><br>>
><br>>
><br>>F:\MAYBANK2U\SQLLIB\function\routine\sqlproc\DB2\EQUITY\tmp>nmake
>/f F:\MAYBANK2U\SQLLIB\function\routine\sqlproc.mak
><br>>
><br>>
><br>>
><br>>
><br>>The name specified is not recognized as an
><br>>
><br>>internal or external command, operable program or batch file.
><br>>
><br>>
><br>>
><br>>----------------------------------------------------------------------------
><br>>
><br>>
><br>>
><br>>SQL7032N SQL procedure "PROCTEST" not created. Diagnostic file is
><br>>
><br>>"P5548890.log". SQLSTATE=42904
><br>>
><br>>
><br>>EQUITY.PROCTEST - Build failed.
><br>>
><br>>EQUITY.PROCTEST - Changes rolled back.
><br>>
><br>>
><br>>Someone pls help...
><br>>Thank You Very Much..
><br>>Best Regrads..YC Choo</blockquote>
></html>
>
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks