Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2003
    Location
    Minneapolis, MN, USA
    Posts
    1

    Lightbulb Unanswered: Stored Proc in DB2 UDB 6.5 - help?

    Hey all, I'm new to DB2 and to this forum. I see a lot of posts about Stored Procs in DB2, but not a lot or version specific or have a great detail of information for us folks tossed into the DB2 world who know little.

    I'm a SQL Server guy historicially and see a need to implement DB2 stored procedures at my present job.

    We're running UDB 6.5 on NT.
    Are there any good resources on the net that rolls a tutorial for stored procedure creation up?

    I don't want to install the compiler on the server (personally I feel that's just a bad idea.)

    Here's the questions...
    1) What compilers can I use? Borland? IBM? I prefer MS (sorry guys)
    2) Where do I find the required *.h files? it always seems as if one's missing when i try examples.
    3) Where on the server do the SP DLLs get placed?
    4) How to I call the SP? Through ODBC?

    If there is no good reference online for this, I'd be happy to put up a page or a site detailing your responses and my experiences.

    Also I see posts alluding to SQL stored procedures, but they need to be compiled. Any hints or links to additional information would be greatly appreciated. Google dosn't find much info for me, which makes me believe that the knowledgeable userbase for UDB 6.5 Stored procs is very thin. (or not net-savvy or generous :)

    Thank you all in advance.

  2. #2
    Join Date
    Oct 2001
    Location
    Bangalore
    Posts
    186
    Hi,

    Here are the answers to your queries:

    1) What compilers can I use? Borland? IBM? I prefer MS (sorry guys)
    Check for the file in your instalation folder SQLLIB\function\routine\sqlproc.mak
    The default compiler options are set for the Microsoft Visual C++
    compiler but you can use the IBM VisualAge C++ compiler as well.

    2) Where do I find the required *.h files? it always seems as if one's missing when i try examples.
    Check for the *.h files in your instalation folder SQLLIB\include

    3) Where on the server do the SP DLLs get placed?
    The DLL get stored in following folder
    SQLLIB\function\routine\sqlproc\databaseNAME\Owner NAME

    4) How to I call the SP? Through ODBC?
    Just connect to the DB and issue CALL OWNER.PROCNAME (Parameters)

    Cheers,
    Prashant

Posting Permissions

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