Hi
I am having a function in Oracle with two input arguments. I need to call this function after the successful execution of my stored procedure.
My typical job design is like this:
I designed a job sequence. The first job activity is a normal job and second job activity is having a stored procedure stage in it. This STP stage is calling a SP from oracle.
[Job Activity1-->JobActivity2-->Notification]
So now after the succesful execution of my SP I need to call function.
Can I use the Another STP stage to call function? And how to pass arguments
for that function[/img]
Calling Function
Moderators: chulett, rschirm, roy
Calling Function
Pradeep Kumar
You sure this is a function? Oracle stored functions are not called, they are selected just like any other field.
First suggestion would be to forget about the function and encapsulate the function's logic into a DataStage job and then run that. Otherwise, you'll need an OCI stage to run a query against dual and to include your function in the column list. Then just run any output from it out to whatever makes sense - a sequential file, audit table, dev null, whatever.
First suggestion would be to forget about the function and encapsulate the function's logic into a DataStage job and then run that. Otherwise, you'll need an OCI stage to run a query against dual and to include your function in the column list. Then just run any output from it out to whatever makes sense - a sequential file, audit table, dev null, whatever.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 301
- Joined: Thu Jul 14, 2005 10:27 am
- Location: Melbourne, Australia
- Contact:
pradkumar,
As chulett said, your Oracle function needs to execute in a query (say against dual) like so ...
If you insist on using your function and want to call it from a STP stage you could create a new "wrapped" stored procedure that simply SELECTs your answer from dual (as above) into a variable and returns that value. Then just call the new wrapped procedure in your STP stage.
HTH,
J.![Smile :-)](./images/smilies/icon_smile.gif)
As chulett said, your Oracle function needs to execute in a query (say against dual) like so ...
Code: Select all
SELECT Function_name( "Arg1", "Arg2")
FROM dual
HTH,
J.
![Smile :-)](./images/smilies/icon_smile.gif)
<b>John McKeever</b>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>
Data Migrators
<b><a href="https://www.mettleci.com">MettleCI</a> - DevOps for DataStage</b>
<a href="http://www.datamigrators.com/"><img src="https://www.datamigrators.com/assets/im ... l.png"></a>