Dynamic parameters

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
phc9741
Participant
Posts: 7
Joined: Thu Jul 24, 2003 7:10 am

Dynamic parameters

Post by phc9741 »

Hi, can anyone tell me if it is possible to pass a variable from a stored procedure to a DB2 stage? What I'm trying to do is call a stored procedure, obtain the result set then pass variables from the result set as parameters to the next stage (DB2) to execute another stored procedure.

Thank you in advance.
roy
Participant
Posts: 2598
Joined: Wed Jul 30, 2003 2:05 am
Location: Israel

Post by roy »

Hi,
if you won't find a way to do it, you can always store it in a table in the 1st SPL and after you done with it in the second SPL drop that table.
the only thing you'll also need is to ensure success of 1st SPL and 2nd SPL and naturally run them in sequential order.

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
phc9741
Participant
Posts: 7
Joined: Thu Jul 24, 2003 7:10 am

Post by phc9741 »

Thanks Roy.

Yes, I've already thought about implementing a job the way you indicated. However, initial results will contain several values which need to be plug into the same variable as a parameter for the second stored procedure., when I call it.

-i.e., result set for parameter [99, 90, 12, 28]

call stored procedure {parameter, 0}
Post Reply