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:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old April 4th, 2007, 10:27 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
DB2 UDB procedural SQL stored procedure

Late this afternoon I found out about the need to take a 3,200 line mainframe cobol DB2 stored procedure and duplicate the functionality with a UDB Procedural SQL stored procedure. Any thoughts/advice on the best approach to this? After pondering a bit I am thinking one main SP that calls a number of smaller SPs and passes back info to the main SP.
I have never done anything other than rather trivial stuff with these kind of SPs.

Any thoughts appreciated,

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
  #2  
Old April 16th, 2007, 08:32 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
Well, I have one main stored procedure that will be called from the client with a few parameters. There is another SP that is called repeatedly to handle updates to a transaction table, and about 10 other SPs called that return result sets or a few parameters. So far so good. The main SP is up to about 800 lines I'd guess and a bit more to go.

Next I have to figure out the error-handling and cascading errors from the called SPs to the main SP and back to the client. Also how to roll back the whole thing should any part fail....

Ideas most welcome,

FV

Reply With Quote
  #3  
Old April 26th, 2007, 11:28 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
Well, all these stored procedures run fine from within the DB2 Develoment Center. All that I tried get an SQL0444N from the lightweigt query tool I like to use, WinSQL (the free version). Someone suggest using parameter markers for the OUT parameters as in
CALL mysp('123456',?,?);
I tried this from the script runner tool in Quest (very nice software) and it ran nicely and very quick. Tried the same in WinSQL - it doesn't like it at all!

So my initial panic at the SQL0444N was based on bogus criteria.

The Db2 Development Center is a really nice tool with good features, but if you lock your screen to leave your desk it goes into limbo and you have to ctrl + alt + delete and kill it when you return and unlock the screen....

SQL PL is really interesting. Much more to learn. I found myself wanting to put semi-colons after statements while working on a VB app this afternoon ;-)

fv

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesDB2 Development > DB2 UDB procedural SQL 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 3 hosted by Hostway