How do I force export from within a loop
Mike Schwartz (PC Support)
mschw at athenet.net
Wed Aug 17 05:59:11 PDT 2005
________________________________________
From: filepro-list-bounces at lists.celestial.com
[mailto:filepro-list-bounces at lists.celestial.com] On Behalf Of Richard
Tartaglias
I use FilePro to export an ASCII output file that is loaded into a CASS
mailing program used to send letters. A person or Company could have more
than ten (10) individual FilePro records that need letters. I have space on
a single letter for only ten (10) lines. Each record that is output takes
one line on the letter.
The problem is I need to force and export of data while still keeping track
of where I am in the index or from inside the get getnext record loop.
I have a routine that prints the letters using FilePro and the FORM
command to force output but have not found a command to force export
within a getnext loop.
----------------------------------
I know John Esak already explained that you can do this by passing
through the export line once for each record you want written, but here is
another method:
Once you open the export file, you can use the "write" command to write
a single line to it. For example, if you open an export file with an alias
like "lout = lettersout.csv", inside your loop, put the statement "write
lout" inside your loop at any point where you want to write a new line to
the lettersout.csv file.
I can send you a sample bit of code that shows how to do this, if you
still can't figure it out. Otherwise, Stuart Werner has a full example and
explanation on page 381 of the 4th edition of his filePro training manual.
(I think he has explained this in all previous versions of his book, as
well...)
Mike Schwartz
More information about the Filepro-list
mailing list