Suppressing main output file

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

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

Suppressing main output file

Post by DM_Cal » Wed Oct 22, 2008 9:20 pm

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

Posts: 14
Joined: Wed Aug 20, 2008 3:55 am

Re: Suppressing main output file

Post by pecosbill » Thu Oct 23, 2008 6:04 am

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: 2206
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia

Re: Suppressing main output file

Post by DataMystic Support » Thu Oct 23, 2008 9:48 am

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.

Simon Carter, - Insulin dose calculator for Type 1 diabetes - 250,000 free software downloads - send huge email attachments

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests