Post a reply

Write your message and submit

Options

Click in the dark area of the image to send your post.

Go back

Topic review (newest first)

Chr
2010-07-05 08:27:54

TOS 3.2.3 ... I use it because I'm also using the Datastage to Talend convert which doesn't work on TOS 4.x

Thanks for your answer!

shong
2010-07-04 03:33:23

Hello
Which version of TOS do you use? It was a bug on 3.x version, it works fine on version 4.x.

Best regards
Shong

Chr
2010-07-02 17:57:41

Hi,

Here is my question :

I had to read a table and put the rows into 2 Output XML files. I did the following :

tAS400Input => tMap => tAdvancedFileOutputXML
                                => tAdvancedFileOutputXML_2

It worked fine.

Now I have to change my job because the first tAdvancedFileOutputXML only has to receive the first row of the table and the second tAdvancedFileOutputXML still receives all rows.

As the table doesn't have any primary key (and I can't change it) I thought of adding a tJavaFlex with a counter and put a restriction in the tMap for the first tAdvancedfileOutputXML.
I wanted to use a tJavaFlex in order to use the "auto propagation" option.

My job now looks like this :

tAS400Input => tJavaFlex => tMap => tAdvancedFileOutputXML
                                                    => tAdvancedFileOutputXML_2

In my tJavaFlex I have the following :

Begin code :
int i=1;

Main Code :
outputLink.counter = i++;

End Code :
<nothing>

I checked the "Auto Propagation" check box option in the tJavaFlex component.

The problem is that the counter value in the tMap is set to 1 for every row... I don't understand why...

I could find a "workaround" by changing the tJavaFlex as the following :

Begin code :
int i=1;

Main Code :
outputLink.name = inputLink.name;
outputLink.firstname = inputLink.firstname;
(... and so on)
outputLink.counter = i++;

End Code :
<nothing>

and NOT checking the "Auto Propagation" check box.

This solution works fine but I don't understand why I have to write the outputlink.columname = inputlink.columname as I thought that the auto propagate check box was created to avoid this.

Thank you in advance for your help

Board footer

Powered by FluxBB