Results 1 to 5 of 5
  1. #1
    Join Date
    Mar 2003
    Posts
    3

    Unanswered: DB2 STORED PROCEDURE Creation problem

    Hi all,

    This is the problem i faced while creating a stored procedure

    DB2ADMIN.PROC1 - Create stored procedure returns -7032.

    DB2ADMIN.PROC1: [IBM][CLI Driver][DB2/NT] SQL7032N SQL procedure "PROC1" not created. Diagnostic file is "P2924840.log". SQLSTATE=42904



    DB2ADMIN.PROC1 - Build failed.

    DB2ADMIN.PROC1 - Changes rolled back.



    Procedure Code
    ------------------

    CREATE PROCEDURE DB2ADMIN.Proc1 ( )
    RESULT SETS 1
    LANGUAGE SQL
    ------------------------------------------------------------------------
    -- SQL Stored Procedure
    ------------------------------------------------------------------------
    P1: BEGIN
    -- Declare cursor
    DECLARE cursor1 CURSOR WITH RETURN FOR
    SELECT
    *
    FROM
    DB2ADMIN.TIJDBDP00;

    -- Cursor left open for client application
    OPEN cursor1;

    END P1


    please help

    Amar

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: DB2 STORED PROCEDURE Creation problem

    Can you post the diagonostic file ?

    BTW, have you installed C/C++ compiler on your system ?

    Cheers

    Sathyaram

    Originally posted by amarjere
    Hi all,

    This is the problem i faced while creating a stored procedure

    DB2ADMIN.PROC1 - Create stored procedure returns -7032.

    DB2ADMIN.PROC1: [IBM][CLI Driver][DB2/NT] SQL7032N SQL procedure "PROC1" not created. Diagnostic file is "P2924840.log". SQLSTATE=42904



    DB2ADMIN.PROC1 - Build failed.

    DB2ADMIN.PROC1 - Changes rolled back.



    Procedure Code
    ------------------

    CREATE PROCEDURE DB2ADMIN.Proc1 ( )
    RESULT SETS 1
    LANGUAGE SQL
    ------------------------------------------------------------------------
    -- SQL Stored Procedure
    ------------------------------------------------------------------------
    P1: BEGIN
    -- Declare cursor
    DECLARE cursor1 CURSOR WITH RETURN FOR
    SELECT
    *
    FROM
    DB2ADMIN.TIJDBDP00;

    -- Cursor left open for client application
    OPEN cursor1;

    END P1


    please help

    Amar

  3. #3
    Join Date
    Mar 2003
    Posts
    3

    Re: DB2 STORED PROCEDURE Creation problem

    Hi Sathyaram,

    I installed the compilers for C/ C++ , Visual Studio infact but the problem seems to persist

    further this is the message from the diagnostic file


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

    LINE MESSAGES FOR P1135070.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\KAIDB\ DB2ADMIN\tmp\P1135070.c ***

    DB2_SQLROUTINE_COMPILER_PATH=C:\Program~1\SQLLIB\f unction\routine\sr_cpath.bat


    @echo on
    set SQLROUTINE_FILENAME=P1135070
    set db2path=C:\PROGRA~1\SQLLIB

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

    *** C:\PROGRA~1\SQLLIB\function\routine\sqlproc\KAIDB\ DB2ADMIN\tmp\P1135070.def ***
    LIBRARY P1135070
    EXPORTS _pgsjmp@4
    pgsjmp=_pgsjmp@4



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

    SQL1042C An unexpected system error occurred.


    Amar

  4. #4
    Join Date
    Mar 2003
    Location
    Dortmund, Germany
    Posts
    18
    I had some Problems to get it up and running as well.
    For me the problem was that it didn't work with spaces in the Visual C++ Installdir.

    I switched to a directory without a space, edited the bat-file and it worked right away. Could that be helpful?

  5. #5
    Join Date
    Mar 2003
    Posts
    3
    hi thankx for u r reply,

    the problem was fixed though.........i had to install SDK which shares some common libraries with db2 on windows.................

    the problem was it was not getting the right dll's at the right place........................

Posting Permissions

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