How do I force export from within a loop
Bill Akers
billa at mgmindustries.com
Thu Aug 18 06:40:48 PDT 2005
Kenneth Brody wrote:
> Quoting Brian K. White (Wed, 17 Aug 2005 16:56:08 -0400):
> [...]
>
>>>This is not correct. If Stuart has explained it that way in his book,
>>>no matter how many times he's reprinted it, he's still wrong. A WRITE
>>>will in no way export a line to an export file. Unless, the EXPORT
>>>line itself is within the loop (getnext or any other kind of loop
>>>which gets successive records) nothing will be added to the export
>>>file. So, unless you mean something else, or Stuart explained it some
>>>other way, this is just not > correct.
>
> [...]
>
>>Sure it will. As long as you allow that he might have meant write().
>
>
> WRITE() won't work without an open file handle from OPEN() or CREATE().
> It won't work with EXPORT, which is what we're talking about here.
>
>
>>Looking up the page in the stn book that he referenced would have shown
>>if he was talking about the file i/o write() command, which might have
>>avoided falsely accusing both Mike and Stuart of being wrong. I don't
>>have that book handy so I can't say that he was talking about the file
>>i/o command or the commit-lookup-now command.
>
> [...]
>
>>And even if it _did_, since he also said "I have proven code I can show
>>you", it's kind of dumb to say "that's wrong" before saying "show me".
>
>
> Actually, it turns out you're both right.
>
> WRITE will, in fact, write out an EXPORT file, _if_ you are in *report.
> It will not do so in *clerk. Why? I can only guess. My guess is that,
> way back when, when IMPORT/EXPORT were not part of clerk's vocabulary,
> it obviously made sense that clerk wouldn't allow "WRITE exportname".
> Way back when, when dclerk was created, and allowed IMPORT/EXPORT, the
> filePro engine wasn't changed, and WRITE still only works in *report.
>
> However, since the documented way of doing multiple exports is to
> execute the EXPORT more than once, rather than WRITE, no one noticed
> until 15+ years later.
I use the write command to build export files from both clerk and
report, with great success. I have one routine which is used as a
called routine in clerk and as the processing for an output in
report. This routine has been used for several years. current OS
SCO Openserver 5.0.6 filepro 5.0.13. This worked in 4.5 and
Openserver 5.0.4 as well. I will be glad to furnish samples for
anyone interested.
>
> --
> KenBrody at BestWeb dot net spamtrap: <g8ymh8uf001 at sneakemail.com>
> http://www.hvcomputer.com
> http://www.fileProPlus.com
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list
>
>
>
--
William P. Akers E-mail: billa at mgmindustries.com
Web Site:
http://www.mgmindustries.com/
More information about the Filepro-list
mailing list