Suppressing main output file

Get help with installation and running here.

Moderators: DataMystic Support, Moderators, DataMystic Support, Moderators, DataMystic Support, Moderators

Post Reply
DM_Cal
Posts: 10
Joined: Thu Oct 18, 2007 9:08 pm

Suppressing main output file

Post 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 files...how 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
pecosbill
Posts: 14
Joined: Wed Aug 20, 2008 3:55 am

Re: Suppressing main output file

Post by pecosbill »

Seems to me you'd want to involve a T-Filter somewhere but that's just a hunch.
User avatar
DataMystic Support
Site Admin
Posts: 2227
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Re: Suppressing main output file

Post 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.
Post Reply