Professional Web Applications Themes

Stored Procs Compiling - IBM DB2

I'm using db2 8.1 with the latest service pack on Windows 2k and XP, both with latest service packs. I have Visual Studio 6 installed with latest service pack. Months ago I found it impossible to compile SPs on my XP machine. The advice given here did not help. It took 15 hours of my time and, by brute force, I tried every possible thing to set variables, etc. Finally it worked, but I have no memory of what did it. I'm now using my Win 2k machine, and have the same problem. (Variables seem to be set right.) A/ ...

  1. #1

    Default Stored Procs Compiling

    I'm using db2 8.1 with the latest service pack on Windows 2k and XP,
    both with latest service packs. I have Visual Studio 6 installed with
    latest service pack.

    Months ago I found it impossible to compile SPs on my XP machine. The
    advice given here did not help. It took 15 hours of my time and, by
    brute force, I tried every possible thing to set variables, etc.
    Finally it worked, but I have no memory of what did it.

    I'm now using my Win 2k machine, and have the same problem.
    (Variables seem to be set right.)

    A/ Should I give up and follow the directions for GCC compiler? If
    so, how do I tell the Development Center to use it?

    B/ Can I copy files from my XP machine to my 2k machine?

    Stan
    Stanley Sinclair Guest

  2. #2

    Default Re: Stored Procs Compiling

    Stanley,

    If you post the error message you are receiving, perhaps someone can help.

    Larry Edelstein

    Stanley Sinclair wrote:
    > I'm using db2 8.1 with the latest service pack on Windows 2k and XP,
    > both with latest service packs. I have Visual Studio 6 installed with
    > latest service pack.
    >
    > Months ago I found it impossible to compile SPs on my XP machine. The
    > advice given here did not help. It took 15 hours of my time and, by
    > brute force, I tried every possible thing to set variables, etc.
    > Finally it worked, but I have no memory of what did it.
    >
    > I'm now using my Win 2k machine, and have the same problem.
    > (Variables seem to be set right.)
    >
    > A/ Should I give up and follow the directions for GCC compiler? If
    > so, how do I tell the Development Center to use it?
    >
    > B/ Can I copy files from my XP machine to my 2k machine?
    >
    > Stan
    Larry Edelstein Guest

  3. #3

    Default Re: Stored Procs Compiling

    Hi Stan,

    I've put variables at the system level; you should maybe have something like
    in the Include, Lib and Path variables:

    Include=
    X:\Program Files\Microsoft Visual Studio\VC98\include
    Lib=
    X:\Program Files\Microsoft Visual Studio\VC98\lib
    Path=
    \Program Files\Microsoft Visual Studio\Common\Tools\WinNT;
    \Program Files\Microsoft Visual Studio\Common\Tools
    \Program Files\Microsoft Visual Studio\VC98\bin
    \Program Files\Microsoft Visual Studio\Common\MSDev98\bin

    The file sqllib\function\routine\sr_cpath.bat is empty.

    I'm using V8 FP3 and it's fine to build procs. Do not position
    DB2ROUTINE_DEBUG=ON (that's for java procs) at the same time, because I have
    experimented the SQL's proc building are stuck.

    Hope this helps,

    Jean-Marc

    "Stanley Sinclair" <stanleysinclairbellsouth.net> a écrit dans le message
    de news:6f569254.0309201522.352e4fa5posting.google.c om...
    > I'm using db2 8.1 with the latest service pack on Windows 2k and XP,
    > both with latest service packs. I have Visual Studio 6 installed with
    > latest service pack.
    >
    > Months ago I found it impossible to compile SPs on my XP machine. The
    > advice given here did not help. It took 15 hours of my time and, by
    > brute force, I tried every possible thing to set variables, etc.
    > Finally it worked, but I have no memory of what did it.
    >
    > I'm now using my Win 2k machine, and have the same problem.
    > (Variables seem to be set right.)
    >
    > A/ Should I give up and follow the directions for GCC compiler? If
    > so, how do I tell the Development Center to use it?
    >
    > B/ Can I copy files from my XP machine to my 2k machine?
    >
    > Stan

    Jean-Marc Blaise Guest

  4. #4

    Default Re: Stored Procs Compiling

    By default Visual Studio 6 does not place its directories on the system LIB
    / INCLUDE / PATH and DB2's developer setup uses the user LIB / INCLUDE /
    PATH. Also some products create a user LIB or INCLUDE, but forget to include
    %LIB% or %INCLUDE%, this hiding the system versions.

    Verify that all of the above system environment variables are correct, and
    reboot to ensure the services pick up any corrections (the SCM doesn't not
    honour environment updated broadcasts).

    "Stanley Sinclair" <stanleysinclairbellsouth.net> wrote in message
    news:6f569254.0309201522.352e4fa5posting.google.c om...
    > I'm using db2 8.1 with the latest service pack on Windows 2k and XP,
    > both with latest service packs. I have Visual Studio 6 installed with
    > latest service pack.
    >
    > Months ago I found it impossible to compile SPs on my XP machine. The
    > advice given here did not help. It took 15 hours of my time and, by
    > brute force, I tried every possible thing to set variables, etc.
    > Finally it worked, but I have no memory of what did it.
    >
    > I'm now using my Win 2k machine, and have the same problem.
    > (Variables seem to be set right.)
    >
    > A/ Should I give up and follow the directions for GCC compiler? If
    > so, how do I tell the Development Center to use it?
    >
    > B/ Can I copy files from my XP machine to my 2k machine?
    >
    > Stan

    Mark Yudkin Guest

  5. #5

    Default Re: Stored Procs Compiling

    Larry Edelstein <lsedelsus.ibm.com> wrote in message news:<3F6CF980.E4C7E09Dus.ibm.com>...
    > Stanley,
    >
    > If you post the error message you are receiving, perhaps someone can help.
    >
    > Larry Edelstein
    >
    Here's what I got (there are five pages in the log file, I'm choosing
    this only:)
    ___________________________________
    The Precompiler message:

    LINE MESSAGES FOR P4555376.sqc
    ------ --------------------------------------------------------------------
    SQL0060W The "C" precompiler is in progress.
    SQL0091W Precompilation or binding was ended with "0"
    errors and "0" warnings.
    ______________________
    The compiler messages:

    C:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\OF FICE\ADMINISTRATOR\tmp>cl
    -Od -W2 /TC -D_X86_=1 -I C:\Progr~1\IBM\SQLLIB\include P4555376.c
    /link -dll -def:P4555376.def /out:P4555376.dll
    c:\PROGRA~1\IBM\SQLLIB\lib\db2api.lib

    P4555376.c

    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(252) : error C2061:
    syntax error : identifier 'DWORD'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(253) : error C2061:
    syntax error : identifier 'Data2'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(253) : error C2059:
    syntax error : ';'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(254) : error C2061:
    syntax error : identifier 'Data3'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(254) : error C2059:
    syntax error : ';'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2061:
    syntax error : identifier 'Data4'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2059:
    syntax error : ';'
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2059:
    syntax error : '['
    C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(256) : error C2059:
    syntax error : '}'
    __________________________________

    Stan
    Stanley Sinclair Guest

  6. #6

    Default Re: Stored Procs Compiling

    Jean-Marc,

    Merci pour vos efforts. Malheureusement . . .

    Voire que j'ai envoyé à Larry Edelstein dans ce fil ('thread').

    Stan
    Stanley Sinclair Guest

  7. #7

    Default Re: Stored Procs Compiling

    Stanley ... what type of Stored Procedures are you trying to compile? These errors (I believe)
    indicate syntax errors. Are you compiling C SPs? SQL? If you are compiling SQL SPs, there should
    be some more error msgs I would think. Also, what is the response on the command line to "db2set
    -all"?

    Larry Edelstein

    Stanley Sinclair wrote:
    > Larry Edelstein <lsedelsus.ibm.com> wrote in message news:<3F6CF980.E4C7E09Dus.ibm.com>...
    > > Stanley,
    > >
    > > If you post the error message you are receiving, perhaps someone can help.
    > >
    > > Larry Edelstein
    > >
    >
    > Here's what I got (there are five pages in the log file, I'm choosing
    > this only:)
    > ___________________________________
    > The Precompiler message:
    >
    > LINE MESSAGES FOR P4555376.sqc
    > ------ --------------------------------------------------------------------
    > SQL0060W The "C" precompiler is in progress.
    > SQL0091W Precompilation or binding was ended with "0"
    > errors and "0" warnings.
    > ______________________
    > The compiler messages:
    >
    > C:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\OF FICE\ADMINISTRATOR\tmp>cl
    > -Od -W2 /TC -D_X86_=1 -I C:\Progr~1\IBM\SQLLIB\include P4555376.c
    > /link -dll -def:P4555376.def /out:P4555376.dll
    > c:\PROGRA~1\IBM\SQLLIB\lib\db2api.lib
    >
    > P4555376.c
    >
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(252) : error C2061:
    > syntax error : identifier 'DWORD'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(253) : error C2061:
    > syntax error : identifier 'Data2'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(253) : error C2059:
    > syntax error : ';'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(254) : error C2061:
    > syntax error : identifier 'Data3'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(254) : error C2059:
    > syntax error : ';'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2061:
    > syntax error : identifier 'Data4'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2059:
    > syntax error : ';'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2059:
    > syntax error : '['
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(256) : error C2059:
    > syntax error : '}'
    > __________________________________
    >
    > Stan
    Larry Edelstein Guest

  8. #8

    Default Re: Stored Procs Compiling

    I forgot to say that the SP I am trying to compile is empty:

    CREATE PROCEDURE PROC1 ()
    BEGIN
    END
    Stanley Sinclair Guest

  9. #9

    Default Re: Stored Procs Compiling

    Stanley,

    I could be wrong, but I do not think that this is enough of a CREATE
    PROCEDURE statement to result in a successful compilation. Why not try
    one of the sample SPs or try one of the examples in the SQL Reference
    under the CREATE PROCEDURE statement.

    Larry Edelstein

    Stanley Sinclair wrote:
    > I forgot to say that the SP I am trying to compile is empty:
    >
    > CREATE PROCEDURE PROC1 ()
    > BEGIN
    > END
    Larry Edelstein Guest

  10. #10

    Default Re: Stored Procs Compiling

    Stanley Sinclair wrote:
    > Larry Edelstein <lsedelsus.ibm.com> wrote in message news:<3F6CF980.E4C7E09Dus.ibm.com>...
    >
    >>Stanley,
    >>
    >>If you post the error message you are receiving, perhaps someone can help.
    >>
    >>Larry Edelstein
    >>
    >
    >
    > Here's what I got (there are five pages in the log file, I'm choosing
    > this only:)
    > ___________________________________
    > The Precompiler message:
    >
    > LINE MESSAGES FOR P4555376.sqc
    > ------ --------------------------------------------------------------------
    > SQL0060W The "C" precompiler is in progress.
    > SQL0091W Precompilation or binding was ended with "0"
    > errors and "0" warnings.
    > ______________________
    > The compiler messages:
    >
    > C:\PROGRA~1\IBM\SQLLIB\function\routine\sqlproc\OF FICE\ADMINISTRATOR\tmp>cl
    > -Od -W2 /TC -D_X86_=1 -I C:\Progr~1\IBM\SQLLIB\include P4555376.c
    > /link -dll -def:P4555376.def /out:P4555376.dll
    > c:\PROGRA~1\IBM\SQLLIB\lib\db2api.lib
    >
    > P4555376.c
    >
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(252) : error C2061:
    > syntax error : identifier 'DWORD'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(253) : error C2061:
    > syntax error : identifier 'Data2'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(253) : error C2059:
    > syntax error : ';'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(254) : error C2061:
    > syntax error : identifier 'Data3'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(254) : error C2059:
    > syntax error : ';'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2061:
    > syntax error : identifier 'Data4'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2059:
    > syntax error : ';'
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(255) : error C2059:
    > syntax error : '['
    > C:\PROGRA~1\MICROS~2\VC98\INCLUDE\sqltypes.h(256) : error C2059:
    > syntax error : '}'
    > __________________________________
    >
    > Stan
    Hi Stan,

    Your include path is wrong. The complier is trying to use vc98's
    sqltypes.h rather than sqllib/include/sqltypes.h. Try put sqllib/include
    before the visualstudio's include directory. I fell into the same trap
    everyday, but too lazy to fix my system environment. :)

    nobody Guest

  11. #11

    Default Re: Stored Procs Compiling

    > Hi Stan,
    >
    > Your include path is wrong. The complier is trying to use vc98's
    > sqltypes.h rather than sqllib/include/sqltypes.h. Try put sqllib/include
    > before the visualstudio's include directory. I fell into the same trap
    > everyday, but too lazy to fix my system environment. :)
    Dear Nobody,

    You got it! Almost.

    The easiest thing to do was to put the sqlllib\include in the right
    place in VCVARS32.BAT. On the SET line.

    Thanks

    Stan
    Stanley Sinclair Guest

Similar Threads

  1. Report Builder and stored Procs
    By LanceS in forum Coldfusion - Advanced Techniques
    Replies: 1
    Last Post: March 9th, 09:16 PM
  2. Stored Procs
    By @ HOTMAIL DOT COM in forum ASP Database
    Replies: 6
    Last Post: November 26th, 12:06 PM
  3. SQL stored procs in 8.1
    By Murty in forum IBM DB2
    Replies: 4
    Last Post: August 25th, 11:21 PM
  4. Help Managing Java Stored Procs
    By Mike L. Bell in forum IBM DB2
    Replies: 6
    Last Post: July 7th, 07:05 PM
  5. Stored Outlines For Queries In PL/SQL Stored Procs
    By Salaam Yitbarek in forum Oracle Server
    Replies: 0
    Last Post: December 5th, 01:54 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139