Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2002
    Posts
    7

    Question Unanswered: Building Stored Procedure

    Hi all,

    Im using the Stored Procedure Builder of the dev-client UDB 7.2. on WIn2k Advanced Server.
    When I try to debug a stored procedure the following error is returned:


    cl -Ox -W2 -TC -D_X86_=1 -DPSMDBG -I"D:\DB2\SQLLIB\include" P2542610.c /link -dll /out:P2542610.dll -def:P2542610.def "D:\DB2\SQLLIB\lib\db2api.lib" "D:\DB2\SQLLIB\lib\db2psmd.lib"

    'cl' is not recognized as an internal or external command,
    operable program or batch file.
    NMAKE : fatal error U1077: 'cl' : return code '1'
    Stop.


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

    SQL7032N SQL procedure "HERPLAN" not created. Diagnostic file is
    "P2542610.log". SQLSTATE=42904


    I installed the Dev-Client on the server and the IBM VisualAge C/C++ Compilers v3.6 as downloaded from the IBM website.

    The evviroment variables are set via the setenv.bat file as follows

    SET INCLUDE=C:\ibmcxxw\INCLUDE
    SET LIB=C:\ibmcxxw\LIB
    PATH=C:\ibmcxxw\BIN (other paths are set but to long to list)

    If anyone has an idea why this error occurs please let me know.
    All help is welcome.

    Kind regards

    P VDP

  2. #2
    Join Date
    Feb 2002
    Posts
    16
    Hi,
    u can get the exact cause of the error in the log file.Have u successfully build the procedure before this?
    Try running add inc of C++.
    And try again

    Regards,
    M

  3. #3
    Join Date
    Mar 2002
    Posts
    7
    Hi,

    It's the first time we try to build this stored procedure .
    I now tried it now with the Borland C++ 5.5 compiler but still it fails to build with the same error.

    Do you actualy need to install C/C++ complete because we only installed the compiler(s).

    Regards,

    P VDP

  4. #4
    Join Date
    Feb 2002
    Posts
    16
    hi,
    i guess u will need to install complete C++ 6.0 ..r u getting Register C++ Add ins where u r able to fine procedure builder ..in program files.

    jus check it out...

  5. #5
    Join Date
    Mar 2002
    Posts
    7
    Problem solved.

    By modifying the sqlproc.mak file as discribed in the file itself and making it read only the stored procedure was build successfuly

    If this is a propper solution i don't know but it worked in our situation.


    Regards,


    P VDP

  6. #6
    Join Date
    Apr 2002
    Posts
    1

    Exclamation

    I'm having the same problem. Do you think you could post your mak file on here, please It would help quite a lot I think.

  7. #7
    Join Date
    Mar 2002
    Posts
    7
    Below you find the content of the sqlproc.mak file.



    # Note: The default compiler options are set for the Microsoft Visual C++
    # compiler. If you use the IBM VisualAge C++ compiler, remove the
    # "COMPILER=MS" below and uncomment "COMPILER=IBM" that follows.
    #COMPILER=MS
    COMPILER=IBM

    # Note: The default is to build with no DEBUG options. If you want to
    # build with DEBUG options, remove "DEBUG=NO" below and uncomment
    # "DEBUG=YES" that follows.
    DEBUG=NO
    #DEBUG=YES

    CFLAGSDEB=
    LINKFLAGSDEB=

    !IF "$(COMPILER)" == "MS"
    # Microsoft Visual C++ compiler
    CC=cl
    !IF "$(DEBUG)" == "YES"
    CFLAGSDEB=-Z7
    LINKFLAGSDEB=-debug:full -pdb:none -debugtype:cv
    !ENDIF
    CFLAGS=-Ox -W2 -TC -D_X86_=1 -DPSMDBG $(CFLAGSDEB) -I"$(DB2PATH)\include"
    LINKFLAGS=/link -dll $(LINKFLAGSDEB) /out:$(SQLROUTINE_FILENAME).dll
    !ENDIF

    !IF "$(COMPILER)" == "IBM"
    # IBM VisualAge C++ compiler
    CC=icc
    !IF "$(DEBUG)" == "YES"
    CFLAGSDEB=-Ti
    LINKFLAGSDEB=/DEBUG
    !ENDIF
    CFLAGS=-Ge- -Gm+ -W0 -DPSMDBG $(CFLAGSDEB) -I"$(DB2PATH)\include"
    LINKFLAGS=/B"/ST:96000 /PM:VIO /DLL $(LINKFLAGSDEB)"
    !ENDIF

    LIBS="$(DB2PATH)\lib\db2api.lib" "$(DB2PATH)\lib\db2psmd.lib"

    {$(SQLROUTINE_FILENAME)}.dll:
    !IF "$(COMPILER)" == "MS"
    $(CC) $(CFLAGS) $(SQLROUTINE_FILENAME).c $(LINKFLAGS) -def:$(SQLROUTINE_FILENAME).def $(LIBS)
    !ELSE
    ilib /GI $(SQLROUTINE_FILENAME).def
    $(CC) $(CFLAGS) $(SQLROUTINE_FILENAME).c $(LINKFLAGS) $(SQLROUTINE_FILENAME).exp $(LIBS)
    !ENDIF




    Regards,

    P VDP

Posting Permissions

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