Stored Procedure output Error mensajes

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
Gius
Participant
Posts: 29
Joined: Mon Mar 09, 2015 2:10 am

Stored Procedure output Error mensajes

Post by Gius »

Hello,
When I use in the job a stored procedure stage, it have two output fields
ProcCode , ProcMess

How can I populate those two variables from the Stored Procedure.
Also, when I do a RETURN x in the stored procedure, how can I capturate this value ?

Thank you
Gius
Participant
Posts: 29
Joined: Mon Mar 09, 2015 2:10 am

Post by Gius »

Is a BD2 database !
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Stored Procedure output Error mensajes

Post by chulett »

Gius wrote:When I use in the job a stored procedure stage, it have two output fields
ProcCode , ProcMess

How can I populate those two variables from the Stored Procedure.
Do you actually mean two input fields? If they are output fields, the procedure is already populating them, I would assume.
Gius also wrote:Also, when I do a RETURN x in the stored procedure, how can I capturate this value ?
From what I recall, the Stored Procedure stage supports three kinds of procedure types: source, target and transform. If you just want to call it and read the return value, it would be a 'source'. If you need to pass data into it when you call it and don't have any output fields, then it is a 'target'. To do both, which I'm guessing is what you need to do, it would be as a 'transform'.
-craig

"You can never have too many knives" -- Logan Nine Fingers
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

All that being said, what are you trying to return? Is 'x' some kind of value or values or is it just the status of the procedure run?
-craig

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