Page 1 of 1

Stored Procedure output Error mensajes

Posted: Wed Apr 15, 2015 5:35 am
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

Posted: Wed Apr 15, 2015 5:36 am
by Gius
Is a BD2 database !

Re: Stored Procedure output Error mensajes

Posted: Wed Apr 15, 2015 7:09 am
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'.

Posted: Wed Apr 15, 2015 8:05 am
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?