Stored Procedure - Forward Row Data -> doesn't work!!

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
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Stored Procedure - Forward Row Data -> doesn't work!!

Post by joycerecacho »

Hello Guys!

I have a problem.
I am using the Stored Procedure to connect DB2 database and there are some fields from Input tab that I want to map do Output and these fields are not used at the Procedure.
I checked the "Forward Row Data" option at the input tab to achieve this result but sometimes these values go to the output and sometimes the output for these fields is empty.

Why does it happen?

I am crazy trying to understand this situation.

Best regards my friends.

Joyce
Joyce A. Recacho
São Paulo/SP
Brazil
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

What type of parameter it is? In, in out.
In parameter mapping have you not used this columns? Can you Post the columns , parameter mapping
Thanks,
Prasanna
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Post by joycerecacho »

Hi!

I have 5 fields at the input.
3 of them, I use as parameter, the others I just want to map the values to the output.
And at the output should exist these 2 and the 7 that return from the procedure.

It depends on the register, sometimes the values maped to the output appears, and sometimes is empty.

I can't understand!!!

Thank u!
Joyce A. Recacho
São Paulo/SP
Brazil
joycerecacho
Participant
Posts: 298
Joined: Tue Aug 26, 2008 12:17 pm

Post by joycerecacho »

I noticed something interesting.
When it returns more the one row from the Procedure, only the first one maps the input fields to the Output, only the first row has values to these fields.
The other rows, don't. They are empty.

Why?!

Is it a kind of bug?!

Thank guys!
Joyce A. Recacho
São Paulo/SP
Brazil
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

Doesnt it sound interesting. Your question made me to explore more on the stage, and here it is what i have read

http://pic.dhe.ibm.com/infocenter/iisin ... ectly.html

So in our case, is the cursor external or internal? it will be obvious that you have looped through cursor in order to perform some business logic inside a procedure. So internally cursor are looped and sent back to datastage and stored procedure stage pass the input data only for one record since it didnt iterate all the rows returned.
So we have two option now, bring the business logic coded in the stored procedure to datastage discarding the power of PL/SQL
Or allow it to pass for the first record and then split the record and join back with rest of columns using the key columns. Eagerly waiting for your reply to confirm really what has happened :) thank you
Thanks,
Prasanna
prasannakumarkk
Participant
Posts: 117
Joined: Wed Feb 06, 2013 9:24 am
Location: Chennai,TN, India

Post by prasannakumarkk »

Thanks for the reply. So it teaches us what is going on. Tip for a day :). Mark the post as workaround
Last edited by prasannakumarkk on Tue Apr 16, 2013 8:26 am, edited 1 time in total.
Thanks,
Prasanna
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

joycerecacho wrote:But I really would like to understand WHY it happens. Is it a kind of Bug?
We would only know the answer to that if you involve your official support provider and ask them. Please let us know what you find out if you do.
-craig

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