Implementing stored procudure

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
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Implementing stored procudure

Post by major »

Hi all,

I have a below requirement , can you please suggest me how best to achieve this

1.I have one oracle table which will contain some columns (daily refresh)
2.I need to read the values from the the above table and pass them to an SP.
3 Need to execute the sp with those values as params.
4.Get the output of the sp into a sequential file.
5.Ftp the file.

I am passing the values of table in point 1 to a file and then to an sp as input params , but I'm not sure how to "capture" the output of the stored procdure.

Thanks in advance
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Any suggestions please....
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't have any docs in front of me, so this is off the top of my head...

From what I recall, the Stored Procedure stage has a property to set it to function as a Source, Target or... Transformer? Basically meant to be in the job flow and get called for every record through the job. I would try setting it like that and then define / map your output columns on the link going out from the stage. From there you can do whatever you like with them - land, ftp, etc.
-craig

"You can never have too many knives" -- Logan Nine Fingers
asorrell
Posts: 1707
Joined: Fri Apr 04, 2003 2:00 pm
Location: Colleyville, Texas

Post by asorrell »

Craig is correct. In this case you'd want to set the stored procedure to be a "transformer" type and set it to return multiple rows.

In your job you'd do a read from the Oracle table to get the information you need - and pass that to input parameters on the stored procedure.
Andy Sorrell
Certified DataStage Consultant
IBM Analytics Champion 2009 - 2020
major
Premium Member
Premium Member
Posts: 167
Joined: Mon Nov 26, 2007 12:21 am

Post by major »

Thanks Guys,

Using STP stage as 'transform' solved my problem :D
Post Reply