Fw: exists command - resolution
Dennis Malen
dmalen at malen.com
Wed Dec 8 11:17:59 PST 2004
----- Original Message -----
From: "Dennis Malen" <dmalen at malen.com>
To: "Brian K. White" <brian at aljex.com>
Sent: Wednesday, December 08, 2004 2:17 PM
Subject: Re: exists command - resolution
> Brian,
>
> Thanks again for your response.
>
> I may not be exporting properly based upon what Ken is saying.
>
> 1. I know I am exporting twice. I tried once to use the same export
> definition which did not work. I defined two separate definitions to
export
> which did work.
>
> 2. Ken and you are saying I don't have to do that, but it works.
>
> 3. In reading Stuart Werner's book I see that he is not using the "write"
> command. I am.
>
> 4. In the use of the "close" command perhaps I should not be using it
before
> I export twice or do I. Because I close the export in each export, this
may
> be causing the problem.
>
> The problem may be in my use of the "write" and "close" commands that are
> causing the problem.
>
> Thanks,
> Dennis
> ----- Original Message -----
> From: "Brian K. White" <brian at aljex.com>
> To: "filePro mailing list" <filepro-list at seaslug.org>
> Sent: Wednesday, December 08, 2004 1:59 PM
> Subject: Re: exists command - resolution
>
>
> >
> > ----- Original Message -----
> > From: "Dennis Malen" <dmalen at malen.com>
> > To: "Kenneth Brody" <kenbrody at bestweb.net>
> > Cc: <filepro-list at lists.celestial.com>
> > Sent: Wednesday, December 08, 2004 1:18 PM
> > Subject: Re: exists command - resolution
> >
> >
> > >I did execute the export twice. The header was overridden. When I
> executed
> > > two differently defined exports it worked.
> >
> > Try the logic I posted.
> > And verify you are using a new enough version of fp that the -a flag has
> > been fixed so it always works.
> >
> > beyond that, you could easily brute force the issue by:
> > exporting to file.unique
> > followed by
> > cat file.unique >> file
> > rm file.unique
> >
> >
> > So if you have a shell script cron job or fp menu batch file:
> > * don't even bother testing for the existence of the file in the report
> > * just have the report always export, no @once or gosub or "-a" needed,
> just
> > a simple table tha says export type out = (@pm) options... followed by
> > out(x)=x
> > * use @pm in parens instead of a file name in the export command
> > * run the report with the following 5 lines of shell:
> >
> > >file.$$
> > rreport ... -r file.$$
> > cat file.$$ >> file
> > rm file.$$
> >
> > This doesn't care if the file already exists or not. It exports to a
temp
> > file and then appends the temp file to the real file. If the real file
> > didn't exist it is simply created. And you don't need to do any testing
in
> > the report.
> >
> > Doing the exists test in the process table and using the -a and the
gosub
> > exp and the @once etc... is good though because it works on any OS
without
> > changes whereas the above shell script needs some adjusting to work on
> > windows.
> >
> > Brian K. White -- brian at aljex.com -- http://www.aljex.com/bkw/
> > +++++[>+++[>+++++>+++++++<<-]<-]>>+.>.+++++.+++++++.-.[>+<---]>++.
> > filePro BBx Linux SCO Prosper/FACTS AutoCAD #callahans Satriani
> >
> > _______________________________________________
> > Filepro-list mailing list
> > Filepro-list at lists.celestial.com
> > http://mailman.celestial.com/mailman/listinfo/filepro-list
> >
> >
> >
>
More information about the Filepro-list
mailing list