How do I force export from within a loop

Kenneth Brody kenbrody at bestweb.net
Thu Aug 18 07:39:36 PDT 2005


Quoting Bill Akers (Thu, 18 Aug 2005 08:40:48 -0500):
[...]
> 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.

"WRITE exportname" is ignored by *clerk.  If you are using it, and
you are exporting multiple times from a single record, then it's
because you have the EXPORT command within the loop.

Try this in dclerk:

==========
:@sn = "":goto @keyT:
::end:
@entsel::show "\{T}- EXPORT multiple records":
::end:
@keyT::export ascii foo=/tmp/out.txt r=\n f=,:
::foo[1] = "one.1"; foo[2] = "one.2" ; write foo:
::foo[1] = "two.1"; foo[2] = "two.2" ; write foo:
::foo[1] = "three.1"; foo[2] = "three.2" ; write foo:
::end:
==========

You will see that only the "three" line ends up in the export.  Then
try it in dreport, and you will see that all three items get exported.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list