Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2003
    Location
    porto - Portugal
    Posts
    74

    Unanswered: stored procedure builder

    Hi people,

    My problem is that i can't build an stored procedure with the stored procedure builder.
    I've already installed the visual studio 6.0 to have a compiler C...but
    the problem continue and i received the folowing error:

    IWH.TESTE - Create stored procedure returns -7032.

    IWH.TESTE:

    *** BIND D:\PROGRA~1\SQLLIB\function\routine\sqlproc\DWCTRL DB\IWH\tmp\P1811080.sqc ***



    LINE MESSAGES FOR P1811080.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\DWCTRL DB\IWH\tmp\P1811080.c ***



    @echo off

    REM set VCV6_DRIVE=c:\Microsoft Visual Studio

    REM set include=%include%;%VCV6_DRIVE%\VC98\atl\include;%V CV6_DRIVE%\VC98\mfc\include;%VCV6_DRIVE%\VC98\incl ude

    REM set lib=%lib%;%VCV6_DRIVE%\VC98\mfc\lib;%VCV6_DRIVE%\V C98\lib

    REM set path=%path%;%VCV6_DRIVE%\Common\Tools\WinNT;%VCV6_ DRIVE%\Common\MSDev98\Bin;%VCV6_DRIVE%\Common\Tool s;%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_DR IVE%\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_D RIVE%\sharedide\bin;%VCV5_DRIVE%\vc\bin



    @echo on

    set SQLROUTINE_FILENAME=P1811080

    set db2path=D:\PROGRA~1\SQLLIB


    nmake /f D:\PROGRA~1\SQLLIB\function\routine\sqlproc.mak


    *** D:\PROGRA~1\SQLLIB\function\routine\sqlproc\DWCTRL DB\IWH\tmp\P1811080.def ***

    LIBRARY P1811080

    EXPORTS _pgsjmp@4

    pgsjmp=_pgsjmp@4


    D:\PROGRA~1\SQLLIB\function\routine\sqlproc\DWCTRL DB\IWH\tmp>set SQLROUTINE_FILENAME=P1811080



    D:\PROGRA~1\SQLLIB\function\routine\sqlproc\DWCTRL DB\IWH\tmp>set db2path=D:\PROGRA~1\SQLLIB



    D:\PROGRA~1\SQLLIB\function\routine\sqlproc\DWCTRL DB\IWH\tmp>nmake /f D:\PROGRA~1\SQLLIB\function\routine\sqlproc.mak



    'nmake' is not recognized as an internal or external command,

    operable program or batch file.


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

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

    "P1811080.log". SQLSTATE=42904

    How can i resolve my problem?


    Thank you for your help!!

    Rui

  2. #2
    Join Date
    Jan 2003
    Posts
    4,292
    Provided Answers: 5
    You need to set the "SQL Procedure Build Options" to the appropriate values for the compiler.

    HTH

    Andy

  3. #3
    Join Date
    Jul 2003
    Location
    porto - Portugal
    Posts
    74

    stred procedure builder

    Thank you for your help!
    I've resolved the problem when i set the appropriate values for the compiler.
    Thanks!


    Originally posted by ARWinner
    You need to set the "SQL Procedure Build Options" to the appropriate values for the compiler.

    HTH

    Andy

  4. #4
    Join Date
    Jul 2003
    Posts
    5

    Re: stred procedure builder

    Hello Rui,

    This moment, could you tell me what you did for configuration/setting in details?

    Many thanks,

    Chi

  5. #5
    Join Date
    Jul 2003
    Location
    porto - Portugal
    Posts
    74

    Re: stored procedure builder

    Chi,


    To set the build options for all SQL stored procedures in the database:
    In the Compiler path field, type the fully qualified path to the command file that sets up the compiler environment variables, as follows:
    For Microsoft Visual C++ Versions 5.0:
    "c:\devstudio\vc\bin\vcvars32.bat"

    For Microsoft Visual C++ Versions 6.0:
    C:\Microsoft Visual Studio\VC98\bin\vcvars32.bat

    For IBM VisualAge C++ for Windows Version 3.6:
    "c:\ibmcxxw\bin\setenv.bat"

    For IBM VisualAge C++ for Windows Version 4:
    "c:\ibmcppw40\bin\setenv.bat"

    Note: If your C++ compiler is not installed on your c: drive, change the path in these commands to reflect the location of the C++ compiler on your system.

    In the Compiler options field, type the C compiler options for building the SQL stored procedures on the database server, as follows:
    For Microsoft Visual C++ Versions 5.0 and 6.0:
    cl -Ox -W2 /TC -D_X86_=1 -IC:\SQLLIB\include SQLROUTINE_FILENAME.c /link -dll -defQLROUTINE_FILENAME.def /outQLROUTINE_FILENAME.dll C:\SQLLIB\lib\db2api.lib

    For IBM VisualAge C++ for Windows Version 3.6:
    "ilib /GI SQLROUTINE_FILENAME.def & icc -Ti -Ge- -Gm+ -W2 -IC:\SQLLIB\include SQLROUTINE_FILENAME.c /B\"/ST:64000 /PM:VIO /DLL\" SQLROUTINE_FILENAME.exp C:\SQLLIB\lib\db2api.lib"

    For IBM VisualAge C++ for Windows Version 4:
    "vacbld"

    If you do not specify the configuration file after the vacbld command, DB2 will create the following default configuration file at the first attempt of creating any SQL procedure:

    C:\SQLLIB\function\routine\sqlproc.icc

    If you want to use your own configuration file, you can specify your own configuration file when setting the DB2 registry value for DB2_SQLROUTINE_COMPILE_COMMAND:

    "vacbld C:\SQLLIB\function\sqlproc.icc"

    Notes:

    Replace C:\SQLLIB with the actual DB2 server install path.
    The above options are the default compile commands if the DB2_SQLROUTINE_COMPILE_COMMAND is not set. To return to the default compiler options, set the value for the Compiler Command to blank.
    In the Precompiler options field, type the precompiler options for building the SQL stored procedures on the database server.
    Type a value in the Debugger timeout field to set the number of seconds before stored procedures run to completion.

    Good Luck Chi,

    Rui

    Originally posted by chi
    Hello Rui,

    This moment, could you tell me what you did for configuration/setting in details?

    Many thanks,

    Chi

  6. #6
    Join Date
    Jul 2003
    Posts
    5

    Re: stored procedure builder

    Hello Rui,

    Thank you for your details.

    I still have 1 question: how could I go to the Compiler path field to set the build options for all SQL stored procedures in the database; I realise I should do at database server side - Is it right?

    I look forward to receiving your reply.

    Chi

  7. #7
    Join Date
    Jul 2003
    Location
    porto - Portugal
    Posts
    74

    Re: stored procedure builder

    Hi,
    You just have to find the file vcvars32.bat or setenv.bat..it depends of the compiler version.
    After that, you have just to open the" SQL Stored Procedure Build Option" Window on the stored procedure builder and put in "Compiler environment": the correct location of this file....for example...C:\Program Files\Microsoft Visual Studio\VC98\bin\vcvars32.bat

    regards,
    Rui

    Originally posted by chi
    Hello Rui,

    Thank you for your details.

    I still have 1 question: how could I go to the Compiler path field to set the build options for all SQL stored procedures in the database; I realise I should do at database server side - Is it right?

    I look forward to receiving your reply.

    Chi

  8. #8
    Join Date
    Jul 2003
    Posts
    5

    Re: stored procedure builder

    Thanks Rui,

    It works. I appreciate you very much for your details step.

    Have a nice weekend,

    Chi

  9. #9
    Join Date
    Oct 2003
    Location
    INDIA
    Posts
    16

    Thumbs up URGENT HELP ---

    Dear All ,

    I am new 2 db2. curretly working on db2 8.1 . Me 2 experiencing the same problem ie

    'nmake' is not recognized as an internal or external command, operable program or batch file.' .



    could not able to build the db2 sql stored procedure .


    I have installed dev-cpp compiler (from http://www.bloodshed.net/devcpp.html) . as we needs to install the c compiler .

    But let me know how I can do the settings ..


    Thanks
    Mahesh L.
    ===========
    L.Mahesh Kumar
    Pls keep mailing in DBFORUMS.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •