Posted: Tue Oct 04, 2011 7:54 pm Post subject: Question on finish file
Knight
Joined: 25 Aug 2006 Posts: 589
I am using WMB 61 and testing the usage of file nodes. I have done two tests and need some help to understand the results
Test 1 is fileinput --> compute --> fileoutput
FileInput node is reading a xml file as a whole, xml is transformed into TDS message and output to a file uisng fileoutput node. The "End of Data " terminal of the fileinput node is connected to the 'Finish File ' terminal of the fileoutput node. This works fine.
Test 2 is FileInput node --> compute (transform and route) --> MQOuptut or FileOutput. The "End of Data " terminal of the fileinput node is connected to the 'Finish File ' terminal of the fileoutput node.
A decision is made based on the xml input file to either write the output to a file or to a queue (but not both).
For this test the ESQL in the compute node is something like
If condition 1 then
propagate to terminal 'out' ---> connected to FileOutput node
if condition 2
propagate to terminal 'out1' ---> connected to MQOutput node
return false;
But the flow wll fail when the output is going to the MQOutput node. A debug shows that the "End of Data " message will trigger the 'Finish File' process and there is no file for fileoutput node to write. If I remove the connection between the "End of Data " terminal of the fileinput node to the 'Finish File ' terminal of the fileoutput node. it will work.
I like to kown if I am doing the right thing ? According to the info center
Finish File is
The input terminal that accepts a message that triggers the final processing of a file.
Now I do not have 'finish file' connected, will the file written by file output be properly closed ?
You need to have some kind of a filter between EOF from FileInput and the EOD for the FileOutput. The filter needs to suppress the EOD for file output when the data is going to MQ...
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum