Hi All,
I need to use a function which will return one value.
for Ex: Sum Function which adds two input values and returns a value.
How can i use this function in datastage job?
Please explain in brief if someone knows this b'coz i never used scripts and functions in datastage.
Thanks in Advance!
Using a plsql function
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 16
- Joined: Thu Sep 08, 2011 8:29 am
- Location: hyderabad
Using a plsql function
Naresh
DataStage Developer
DataStage Developer
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 16
- Joined: Thu Sep 08, 2011 8:29 am
- Location: hyderabad
Thanks for the reply ray.ray.wurlod wrote:The obvious answer is to use the function within a user-defined SELECT statement. ...
yes we can call using the select statement, but i want to know how to call it from any of the other stages.
And how to invoke the procedures from datastage jobs please help me out if you have any idea.
Naresh
DataStage Developer
DataStage Developer
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
It is not possible by any other means. A plsql function must be invoked from within an SQL statement. Therefore any stage that needs to use it must run some SQL. The stages that connect to Oracle are the only ones that can run Oracle SQL. (One exception: you could set up a command that runs sqlplus from the command line to execute an SQL statement, but that's introducing an extra layer of software (the operating system shell) for no good reason.)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.