Re: reporting into different files with one report
Posted in 1995
>From: jsturm@garnet.msen.com (Jeffrey Sturm) >Subject: Re: reporting into different files with one report >Date: 24 Jan 1995 00:21:42 GMT >X-Informix-List-Id: <news.11037> > >Joerg Spilker (Joerg_Spilker@daolin.fido.de) wrote: >: i need to report data into three different files simultaneously. The format is >: the same for all three files. I don't want to make three copies of the report >: which are opened with different file names. Any idea? > >: I tried with the REPORT TO variable statement in the report itself and >: "variable" was a report parameter with the filename to report to. But all data >: goes into the file passed first to the report. Later changes in the parameter >: have no effect. >Howabout REPORT TO PIPE "tee file_one | tee file_two >file_three"? (I haven't >tried this, but why not?) I think "tee" does unbuffered I/O, so the outputs >would be syncronized, if it matters. I managed to restrain myself from answering before I got this far through my email backlog (1 day -- 280 emails). I would also suggest that using tee is the key to the solution. However, what about reading the manual page for tee(1) a little more carefully: NAME tee - replicate the standard output SYNOPSIS tee [-a] [-i] [filename]... DESCRIPTION tee transcribes the standard input to the standard output and makes copies in the filenames. So, I would use: START REPORT TO PIPE "tee file1 file2 file3 >/dev/null" Although you could use "> file3", I think it would be simpler to program the list of files and then simply add ">/dev/null". I apologise if someone else has already pointed this out. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>