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
Stored Procedure - Forward Row Data -> doesn't work!!
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
Stored Procedure - Forward Row Data -> doesn't work!!
Joyce A. Recacho
São Paulo/SP
Brazil
São Paulo/SP
Brazil
-
- Participant
- Posts: 117
- Joined: Wed Feb 06, 2013 9:24 am
- Location: Chennai,TN, India
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
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!
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
São Paulo/SP
Brazil
-
- Participant
- Posts: 298
- Joined: Tue Aug 26, 2008 12:17 pm
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!
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
São Paulo/SP
Brazil
-
- Participant
- Posts: 117
- Joined: Wed Feb 06, 2013 9:24 am
- Location: Chennai,TN, India
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
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
Prasanna
-
- Participant
- Posts: 117
- Joined: Wed Feb 06, 2013 9:24 am
- Location: Chennai,TN, India
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
Prasanna
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.joycerecacho wrote:But I really would like to understand WHY it happens. Is it a kind of Bug?
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers