How to capture a output result-set in the (Stored Procedure)

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
durgaps
Participant
Posts: 74
Joined: Sat Jul 08, 2006 4:09 am
Location: Melbourne, Australia
Contact:

How to capture a output result-set in the (Stored Procedure)

Post by durgaps »

I need to call a Stored Procedure stage where my input is 3 params and output is 2 parameters one of which is a Cursor which is returning a 3 row-2 col result set. Can anybody tell me how to catch the output result-set in the STP stage? i.e. how to define in the PARAMETERS Grid? Please let know.

The procedure type I am using is 'Transform Type' in the STP stage.
Durga Prasad
felixyong
Participant
Posts: 35
Joined: Tue Jul 22, 2003 7:24 pm
Location: Australia

Re: How to capture a output result-set in the (Stored Proced

Post by felixyong »

durgaps wrote:I need to call a Stored Procedure stage where my input is 3 params and output is 2 parameters one of which is a Cursor which is returning a 3 row-2 col result set. Can anybody tell me how to catch the output result-set in the STP stage? i.e. how to define in the PARAMETERS Grid? Please let know.

The procedure type I am using is 'Transform Type' in the STP stage.
Source and Target procedures use the column meta data as parameters to pass into the procedure. You do not have to enter the parameter information, and if you enter it, the stage ignores it. Source procedures use the column meta data as output parameters (to read from the database). Target procedures use the column meta data as input parameters (to write to the database).

CAUTION: Source and Target procedures cannot have both input and output links. You must use a Transform procedure.

If you wish to mix and match parameters to column meta data, use a Transform procedure and specify the Stored Procedure Parameters in the parameters grid.

All procedures can do the following:

1) Return an error code (defined by the user or from the database) that can be mapped to the data flow

2) Return a message (defined by the user or from the database) that can be mapped to the data flow

3) Allow user-defined fatal and warning-code recovery decisions

4) Define transaction isolation levels

5) Allow a commit size to be specified when executing a procedure that inserts rows

6) Allow a user-defined procedure execution statement (not normally used)

7) Allow more than one row to be returned when reading
Regards
Felix
durgaps
Participant
Posts: 74
Joined: Sat Jul 08, 2006 4:09 am
Location: Melbourne, Australia
Contact:

Re: How to capture a output result-set in the (Stored Proced

Post by durgaps »

Hi Felix,

Thanks for the info. But i am using a Transform procedure. If possible can u plz provide a simple example on how to achieve it. :)

Thanks
Durga Prasad
Post Reply