passing arguments to the stored procedure in DS

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
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

passing arguments to the stored procedure in DS

Post by kalpna »

Hi! Evryone,

I have a table/file containing a list of policy_nos and I have a stored procedure, which takes this policy_no as a parameter to generate some output.
so, my question is, how can I implement it in DS?
I Need to call the procedure for ecah policy_no in the list.

Any suggestions?

Thanks
Kalpana.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Import the Stored Procedure definition into DataStage. This will give you the columns corresponding to its arguments.

Call the stored procedure (from an ODBC stage, etc., or from a Stored Procedure stage).
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
dh_Madhu
Premium Member
Premium Member
Posts: 65
Joined: Sat Apr 23, 2005 3:19 am
Location: Stirling, Scotland

Post by dh_Madhu »

Hi! Ray,
I think,
the problem is not executing the stored procedure. but, how should I pass more than one policy number into stored procedure...
I mean, calling stored procedure for every policy....!!!

how is that possible?
Regards,
Madhu Dharmapuri
kalpna
Premium Member
Premium Member
Posts: 78
Joined: Thu Feb 02, 2006 3:56 am

Post by kalpna »

BAsically my question is, How can we call a stored procedure repititively with different arguments?

Using a stored procedure stage, how can we pass a dynamic parameter?

How can we implement this in DS?
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Select the table that contain the policy_no thorugh a oracle stage and link it to the ODBC stage which calls the stroed procedure. The output of the OCI will the input for the ODBC.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

For that, you could use the Stored Procedure stage rather than ODBC. It can be used like a transformer, so to speak, on a row by row basis.

What version of DataStage? What database?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply