Hi,

We are facing the following VC++ error while compiling SQL stored procedures on DB2 UDB 8.1.5 (Enterprise Server Edition) running on Windows 2003.

************************************************** ************************************************** ************************************************** ********************
RNJ.FIND_STRING - Build started.
DROP SPECIFIC PROCEDURE RNJ.SQL040608084225680
RNJ.FIND_STRING - Drop stored procedure completed.
Create stored procedure returns -7032.

-- LOG FILE P7410910.log FOR PROCEDURE RNJ .FIND_STRING

-- DB2_SQLROUTINE_PREPOPTS=

-- PREP/BIND MESSAGES FOR H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp\P7 410910.sqc
LINE MESSAGES FOR P7410910.sqc ------ -------------------------------------------------------------------- SQL0060W The "C" precompiler is in progress. SQL0091W Precompilation or binding was ended with "0" errors and "0" warnings.

-- DB2_SQLROUTINE_COMPILER_PATH=C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat

-- CONTENTS OF C:\Program Files\Microsoft Visual Studio\VC98\Bin\vcvars32.bat

@echo off rem rem Root of Visual Developer Studio Common files. set VSCommonDir=C:\PROGRA~1\Microsoft Visual Studio\Common rem rem Root of Visual Developer Studio installed files. rem set MSDevDir=C:\PROGRA~1\Microsoft Visual Studio\Common\msdev98 rem rem Root of Visual C++ installed files. rem set MSVCDir=C:\PROGRA~1\Microsoft Visual Studio\VC98 rem rem VcOsDir is used to help create either a Windows 95 or Windows NT specific path. rem set VcOsDir=WIN95 if "%OS%" == "Windows_NT" set VcOsDir=WINNT rem echo Setting environment for using Microsoft Visual C++ tools. rem if "%OS%" == "Windows_NT" set PATH=%MSDevDir%\BIN;%MSVCDir%\BIN;%VSCommonDir%\TO OLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH% if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDi r%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir %\SYSTEM";"%PATH%" set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%M SVCDir%\MFC\INCLUDE;%INCLUDE% set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB% set VcOsDir= set VSCommonDir=

-- CONTENTS OF H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp\P7 410910.BAT

@echo on
set SQLROUTINE_FILENAME=P7410910
set db2path=H:\SQLLIB

-- COMPILATION COMMAND:

nmake /f H:\SQLLIB\function\routine\sqlproc.mak



-- CONTENTS OF H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp\P7 410910.def

LIBRARY P7410910
EXPORTS _pgsjmp@8
pgsjmp=_pgsjmp@8



-- COMPILATION MESSAGES FOR H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp\P7 410910.c
-- C COMPILATION ERROR CODES: 0 0 2
Setting environment for using Microsoft Visual C++ tools. H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp>se t SQLROUTINE_FILENAME=P7410910 H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp>se t db2path=H:\SQLLIB H:\SQLLIB\function\routine\sqlproc\DNJP\RNJ\tmp>nm ake /f H:\SQLLIB\function\routine\sqlproc.mak cl -Ox -W2 -TC -D_X86_=1 -MD -I"H:\SQLLIB\include" P7410910.c /link -dll /out:P7410910.dll -def:P7410910.def "H:\SQLLIB\lib\db2api.lib" P7410910.c Microsoft (R) Incremental Linker Version 6.00.8168 Copyright (C) Microsoft Corp 1992-1998. All rights reserved. LINK : fatal error LNK1104: cannot open file "C:\DOCUME~1\pajnj.SEW00735\Local" Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86 Copyright (C) Microsoft Corp 1984-1998. All rights reserved. NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop.

-- END OF LOG FILE (SQLCODE: -7032)
RNJ.FIND_STRING - Build failed.
RNJ.FIND_STRING - Roll back completed successfully.

************************************************** ************************************************** ************************************************** ******

DB2PATH environment variable have been set to "C:\Program FIles\Microsoft Visual Studio\VC98\Bin", - location of NMAKE.EXE.

Compilation have been tried using DB2 Development Client installed on the server itself, but error remains. Also there are no rights issue or space issues on the server.

Please revert back in case any of you can help.

Thanks & Regards,
Harpreet