SunQuest
           DB2 Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesDB2 Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old December 21st, 2004, 04:11 PM
efren_cd efren_cd is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 25 efren_cd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 57 m 7 sec
Reputation Power: 0
Stored Procedure

I have been looking a manual or tutorial but without results at this time, I hope that you can help me, I want to create stored procedure in db2.. how can i do that?

Regards

Reply With Quote
  #2  
Old December 21st, 2004, 10:24 PM
fractalvibes fractalvibes is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Location: Waco, Texas
Posts: 632 fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 14 h 11 m 13 sec
Reputation Power: 22
Depends upon what/how you want to do it and the system you are doing it on.

For Using PSQL to write on Linux/Unix/Windows take a look here: http://www.phptr.com/title/0131007726 and there are probably a couple of more books on the phptr site. The one I have is pretty good. Should also be some good articles here:
http://www-130.ibm.com/developerworks/db2/
Search for stored procedures.

I have done a few using PSL on Windows and also few in COBOL on OS/390.

With DB2 Version...8.2? (Stinger) there is also integration to do these within Visual Studio in ASP.NET, for example.

Or I think you can do them with Java also.

So, it depends upon which way you need to go...

fv
__________________
...because that is the way we have always done it. We've been doing it like that for 80 Years! (How do we change that mindset?)

Reply With Quote
  #3  
Old December 22nd, 2004, 07:58 AM
Onslaught's Avatar
Onslaught Onslaught is offline
/(bb|[^b]{2})/
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: Nov 2001
Location: Somewhere in the great unknown
Posts: 4,829 Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level)Onslaught User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 1 Day 23 h 5 m 8 sec
Reputation Power: 88
Send a message via ICQ to Onslaught
You basically have three different methods to do stored procs in:
Java, SQL, & C. This may be different in 8.2 though, they might have added .net capability to it.

You must have the compiling environment on the database server even if you write it in SQL.

Reply With Quote
  #4  
Old December 22nd, 2004, 08:39 PM
fractalvibes fractalvibes is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Location: Waco, Texas
Posts: 632 fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 14 h 11 m 13 sec
Reputation Power: 22
Yes, for SQL and C stored procs, you do have to have a C compiler at least on the developement box.


More than 3 ways though....
On the mainframe side you can use COBOL and PL1.

Starting with Stinger you can do stored procs with .NET.

I think starting with v 7.2 you could use VB 6 to create something called OLE stored procs, but hadn't seen squat for documentation or examples of that...

So depending on your environment(s) you have a number of ways you can go with DB2 Stored Procedures. Do check out the IBM DevloperWorks site aforementioned - some good articles and info there.

fv

Reply With Quote
  #5  
Old February 10th, 2005, 06:08 PM
efren_cd efren_cd is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 25 efren_cd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 57 m 7 sec
Reputation Power: 0
ok, but which program i have to use to make Stored Procedure, I'm working in DB2 on AS400, and i want to make Stored Procedure called from java ..

Reply With Quote
  #6  
Old February 10th, 2005, 06:14 PM
efren_cd efren_cd is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2004
Posts: 25 efren_cd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 57 m 7 sec
Reputation Power: 0
also i have looking the DB2 add in for VB.NET. I searched in IBM but the link is broken.., where can i find that??? any suggestion??

Reply With Quote
  #7  
Old February 10th, 2005, 07:04 PM
fractalvibes fractalvibes is offline
Contributing User
Dev Shed Novice (500 - 999 posts)
 
Join Date: Jun 2003
Location: Waco, Texas
Posts: 632 fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level)fractalvibes User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Week 14 h 11 m 13 sec
Reputation Power: 22
Your best bet would be to look here :
http://www-130.ibm.com/developerworks/db2/

You will probably need/want the client software that contains the IBM control center and that whole suite of tools. Our UDB DBA came around and installed all the software from CDs he got, so don't have a link for that. In UDB V 8 the control center became the Development center. I have used a little in V 7 to create PSL stored procs. You could do the same and call from Java apps I am sure. I think you can even write stored procs in Java also, though I never have. Do some searches at that link I gave - there are tutorials and guidance about all of these things there.

fv

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > Stored Procedure


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway