Page 1 of 1

Suppressing main output file

Posted: Wed Oct 22, 2008 9:20 pm
by DM_Cal
I wonder if someone can help me here.
I have a filter that takes in input files and merges them. What I want to do is generate a full report from the main output (so far so good) but I also want to generate a file (doesn't matter what is in it) that tells me how many input files I received. I then have a process that will trigger an alert if less than a set number of input files were received. I can do the main report part OK, and I can sort of do the second part in a separate filter (but this would mean copying the input files to two different locations and running separate filters on each but I can live with that since this sounds too complex to put into one filter).
My main problem on the second filter is that I can't suppress the main output. In the second filter I remove everything bar the headers that are the same in each file. I then add line numbers and do a sort so that I can see which is the first number (highest) which will correspond to the number of files received. I then do 3 restricts to see if the highest is 3 or 2 or 1. If it's either of these then a secondary output file gets generated to a folder (my trigger). If the value is >3 then no triggers are created which is OK. Only problem is that at the end of the filter an output still gets generated somewhere regardless of number of input can I prevent this so only the triggers get created? I fear that, because an output needs to be created, then a file will always be generated. Is this true?
thanks in advance

Re: Suppressing main output file

Posted: Thu Oct 23, 2008 6:04 am
by pecosbill
Seems to me you'd want to involve a T-Filter somewhere but that's just a hunch.

Re: Suppressing main output file

Posted: Thu Oct 23, 2008 9:48 am
by DataMystic Support
Yes - use a T-filter, which copies the input and then removes it to prevent it rejoining the output stream (which is part of your other problem - use a Remove All filter).

Instead of a line number + sort, use a grep filter with the count lines option, to match lines with pattern
which will match any line with at least one character.