Calling stored procedure of db2

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
dsuser1
Participant
Posts: 14
Joined: Thu Oct 16, 2003 5:58 pm

Calling stored procedure of db2

Post by dsuser1 »

i have a need to call the db2 udb stored procedures from datastage. is it possible from datastage? which stage should i use for this? also can i execute the stored procedure for each row that i am processing passing some of the columns and get back some output values?

TIA
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
By db2 udb I guess you ment not as400 DB2, so you need to try to one of the following:
1. import the SPL definition and use it (see the manuals/help and check the search here).
2. use user defined query with the apropriate statement to run it (something like ecexute procedure ...).
3. create a view that does the work for you and returns the rows and simply read from it.

now if your SPL has some logic regarding the transformation of some data in the rows you process I recomend writing it with DS capabilities and not SPL.

for the DB2 on as400, I'm not sure they support SPL yet, then again I'm not upto date on that, last time I checked (was releas 5.1 I think) they didn't have it.

if there is something else in the DS enterprise edition (PX) I bet Teej can enliten you on it.

IHTH
Roy R.
Time is money but when you don't have money time is all you can afford.

Search before posting:)

Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Image
Post Reply