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