Win2k - DB2 / Compiling stored procedures - V7

Win2k - DB2 / Compiling stored procedures - V7

Post by Plisk » Fri, 14 Feb 2003 23:10:29



I can't get my system to compile stored procedures. I've configured
the SP build options according to the documentation guidelines. I'm
using Visual C++ as the compiler. I've installed the system on three
seperate machines, but the error message is always the same when I go
to build. Any help would be appreciated.

Error message/activity log:

DB2ADMIN.PROC1 - Create stored procedure returns -7032.

DB2ADMIN.PROC1:

*** BIND C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp\P0723750.sqc
***

LINE    MESSAGES FOR P0723750.sqc

------  --------------------------------------------------------------------

        SQL0060W  The "C" precompiler is in progress.

        SQL0091W  Precompilation or binding was ended with "0"

                  errors and "0" warnings.

*** COMPILE C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp\P0723750.c
***

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

DB2_SQLROUTINE_COMPILE_COMMAND=cl -Ox -W2 /TC -D_X86_=1
-IC:\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll
-def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll C:\Program
Files\SQLLIB\lib\db2api.lib

rem

rem Root of Visual Developer Studio Common files.

set VSCommonDir=C:\PROGRA~1\MICROS~3\Common

rem

rem Root of Visual Developer Studio installed files.

rem

set MSDevDir=C:\PROGRA~1\MICROS~3\Common\msdev98

rem

rem Root of Visual C++ installed files.

rem

set MSVCDir=C:\PROGRA~1\MICROS~3\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%\TOOLS\%VcOsDir%;%VSCommonDir%\TOOLS;%PATH%

if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonDir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"

set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INCLUDE;%INCLUDE%

set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%

set VcOsDir=

set VSCommonDir=

set SQLROUTINE_FILENAME=P0723750

set db2path=C:\PROGRA~1\SQLLIB

cl -Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include P0723750.c /link -dll
-def:P0723750.def /out:P0723750.dll C:\Program
Files\SQLLIB\lib\db2api.lib

*** C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp\P0723750.def
***

LIBRARY P0723750



Setting environment for using Microsoft Visual C++ tools.

C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>set
SQLROUTINE_FILENAME=P0723750

C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>set
db2path=C:\PROGRA~1\SQLLIB

C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>cl
-Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include P0723750.c /link -dll
-def:P0723750.def /out:P0723750.dll C:\Program
Files\SQLLIB\lib\db2api.lib

P0723750.c

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(252) : error C2061:
syntax error : identifier 'DWORD'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(253) : error C2061:
syntax error : identifier 'Data2'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(253) : error C2059:
syntax error : ';'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(254) : error C2061:
syntax error : identifier 'Data3'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(254) : error C2059:
syntax error : ';'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2061:
syntax error : identifier 'Data4'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2059:
syntax error : ';'

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2059:
syntax error : '['

C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(256) : error C2059:
syntax error : '}'

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for
80x86

Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

----------------------------------------------------------------------------

SQL7032N  SQL procedure "" not created.  Diagnostic file is "".

DB2ADMIN.PROC1 - Changes rolled back.

DB2ADMIN.PROC1 - Build failed.

 
 
 

Win2k - DB2 / Compiling stored procedures - V7

Post by Maor7 » Sat, 15 Feb 2003 09:39:33


Hello Pliskin,

check your sr_cpath.bat file (if Windows system) and make sure that it

set VCV6_DRIVE=c:\program files\Microsoft Visual Studio
set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\m-
fc\include;%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\MSD-
ev98\Bin;%VCV6_DRIVE%\Common\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\V-
C98\mfc\lib;%VCV6_DRIVE%\VC98\lib;%VCV6_DRIVE%\VC98\Include

Originally posted by Pliskin

> I can't get my system to compile stored procedures. I've configured
> the SP build options according to the documentation guidelines. I'm
> using Visual C++ as the compiler. I've installed the system on three
> seperate machines, but the error message is always the same when I go
> to build. Any help would be appreciated.

> Error message/activity log:

> DB2ADMIN.PROC1 - Create stored procedure returns -7032.

> DB2ADMIN.PROC1:

> *** BIND C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN-
> \tmp\P0723750.sqc
> ***

> LINE    MESSAGES FOR P0723750.sqc

> ------
> --------------------------------------------------------------------

>         SQL0060W  The "C" precompiler is in progress.

>         SQL0091W  Precompilation or binding was ended with "0"

>                   errors and "0" warnings.

> *** COMPILE C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2AD-
> MIN\tmp\P0723750.c
> ***

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

> DB2_SQLROUTINE_COMPILE_COMMAND=cl -Ox -W2 /TC -D_X86_=1
> -IC:\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll
> -def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll C:\Program
> Files\SQLLIB\lib\db2api.lib


> rem

> rem Root of Visual Developer Studio Common files.

> set VSCommonDir=C:\PROGRA~1\MICROS~3\Common

> rem

> rem Root of Visual Developer Studio installed files.

> rem

> set MSDevDir=C:\PROGRA~1\MICROS~3\Common\msdev98

> rem

> rem Root of Visual C++ installed files.

> rem

> set MSVCDir=C:\PROGRA~1\MICROS~3\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%\TOOLS\%VcOsDir%;%VSCo-
> mmonDir%\TOOLS;%PATH%

> if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonD-
> ir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"

> set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INC-
> LUDE;%INCLUDE%

> set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%

> set VcOsDir=

> set VSCommonDir=


> set SQLROUTINE_FILENAME=P0723750

> set db2path=C:\PROGRA~1\SQLLIB

> cl -Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include P0723750.c /link -dll
> -def:P0723750.def /out:P0723750.dll C:\Program
> Files\SQLLIB\lib\db2api.lib

> *** C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp\-
> P0723750.def
> ***

> LIBRARY P0723750



> Setting environment for using Microsoft Visual C++ tools.

> C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>set
> SQLROUTINE_FILENAME=P0723750

> C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>set
> db2path=C:\PROGRA~1\SQLLIB

> C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>cl
> -Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include P0723750.c /link -dll
> -def:P0723750.def /out:P0723750.dll C:\Program
> Files\SQLLIB\lib\db2api.lib

> P0723750.c

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(252) : error C2061:
> syntax error : identifier 'DWORD'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(253) : error C2061:
> syntax error : identifier 'Data2'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(253) : error C2059:
> syntax error : ';'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(254) : error C2061:
> syntax error : identifier 'Data3'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(254) : error C2059:
> syntax error : ';'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2061:
> syntax error : identifier 'Data4'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2059:
> syntax error : ';'

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2059:
> syntax error : '['

> C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(256) : error C2059:
> syntax error : '}'

> Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for
> 80x86

> Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

> ---------------------------------------------------------------------
> --------

> SQL7032N  SQL procedure "" not created.  Diagnostic file is "".

> DB2ADMIN.PROC1 - Changes rolled back.

DB2ADMIN.PROC1 - Build failed.

--
Posted via http://dbforums.com

 
 
 

Win2k - DB2 / Compiling stored procedures - V7

Post by Plisk » Sat, 15 Feb 2003 19:00:03


Thanks for the reply.

Unfortunately I already did that on all three machines (without
success)! Any other suggestions?

Pliskin


> Hello Pliskin,

> check your sr_cpath.bat file (if Windows system) and make sure that it
> points out to your C++ install directories

> set VCV6_DRIVE=c:\program files\Microsoft Visual Studio
> set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%VCV6_DRIVE%\VC98\m-
> fc\include;%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\MSD-
> ev98\Bin;%VCV6_DRIVE%\Common\Tools;%VCV6_DRIVE%\VC98\bin;%VCV6_DRIVE%\V-
> C98\mfc\lib;%VCV6_DRIVE%\VC98\lib;%VCV6_DRIVE%\VC98\Include

> Originally posted by Pliskin
> > I can't get my system to compile stored procedures. I've configured
> > the SP build options according to the documentation guidelines. I'm
> > using Visual C++ as the compiler. I've installed the system on three
> > seperate machines, but the error message is always the same when I go
> > to build. Any help would be appreciated.

> > Error message/activity log:

> > DB2ADMIN.PROC1 - Create stored procedure returns -7032.

> > DB2ADMIN.PROC1:

> > *** BIND C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN-
> > \tmp\P0723750.sqc
> > ***

> > LINE    MESSAGES FOR P0723750.sqc

> > ------
> > --------------------------------------------------------------------

> >         SQL0060W  The "C" precompiler is in progress.

> >         SQL0091W  Precompilation or binding was ended with "0"

> >                   errors and "0" warnings.

> > *** COMPILE C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2AD-
> > MIN\tmp\P0723750.c
> > ***

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

> > DB2_SQLROUTINE_COMPILE_COMMAND=cl -Ox -W2 /TC -D_X86_=1
> > -IC:\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll
> > -def:SQLROUTINE_FILENAME.def /out:SQLROUTINE_FILENAME.dll C:\Program
> > Files\SQLLIB\lib\db2api.lib


> > rem

> > rem Root of Visual Developer Studio Common files.

> > set VSCommonDir=C:\PROGRA~1\MICROS~3\Common

> > rem

> > rem Root of Visual Developer Studio installed files.

> > rem

> > set MSDevDir=C:\PROGRA~1\MICROS~3\Common\msdev98

> > rem

> > rem Root of Visual C++ installed files.

> > rem

> > set MSVCDir=C:\PROGRA~1\MICROS~3\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%\TOOLS\%VcOsDir%;%VSCo-
> > mmonDir%\TOOLS;%PATH%

> > if "%OS%" == "" set PATH="%MSDevDir%\BIN";"%MSVCDir%\BIN";"%VSCommonD-
> > ir%\TOOLS\%VcOsDir%";"%VSCommonDir%\TOOLS";"%windir%\SYSTEM";"%PATH%"

> > set INCLUDE=%MSVCDir%\ATL\INCLUDE;%MSVCDir%\INCLUDE;%MSVCDir%\MFC\INC-
> > LUDE;%INCLUDE%

> > set LIB=%MSVCDir%\LIB;%MSVCDir%\MFC\LIB;%LIB%

> > set VcOsDir=

> > set VSCommonDir=


> > set SQLROUTINE_FILENAME=P0723750

> > set db2path=C:\PROGRA~1\SQLLIB

> > cl -Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include P0723750.c /link -dll
> > -def:P0723750.def /out:P0723750.dll C:\Program
> > Files\SQLLIB\lib\db2api.lib

> > *** C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp\-
> > P0723750.def
> > ***

> > LIBRARY P0723750



> > Setting environment for using Microsoft Visual C++ tools.

> > C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>set
> > SQLROUTINE_FILENAME=P0723750

> > C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>set
> > db2path=C:\PROGRA~1\SQLLIB

> > C:\PROGRA~1\SQLLIB\function\routine\sqlproc\LIBRARY\DB2ADMIN\tmp>cl
> > -Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include P0723750.c /link -dll
> > -def:P0723750.def /out:P0723750.dll C:\Program
> > Files\SQLLIB\lib\db2api.lib

> > P0723750.c

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(252) : error C2061:
> > syntax error : identifier 'DWORD'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(253) : error C2061:
> > syntax error : identifier 'Data2'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(253) : error C2059:
> > syntax error : ';'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(254) : error C2061:
> > syntax error : identifier 'Data3'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(254) : error C2059:
> > syntax error : ';'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2061:
> > syntax error : identifier 'Data4'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2059:
> > syntax error : ';'

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(255) : error C2059:
> > syntax error : '['

> > C:\PROGRA~1\MICROS~3\VC98\INCLUDE\sqltypes.h(256) : error C2059:
> > syntax error : '}'

> > Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for
> > 80x86

> > Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

> > ---------------------------------------------------------------------
> > --------

> > SQL7032N  SQL procedure "" not created.  Diagnostic file is "".

> > DB2ADMIN.PROC1 - Changes rolled back.

> DB2ADMIN.PROC1 - Build failed.