export question

Jeff Harrison jeffaharrison at yahoo.com
Sat Oct 30 19:22:07 PDT 2004


--- Roger Cornelius <rac at custom-mobility.com> wrote:

> On Fri Oct 29 14:57, Jeff Harrison wrote:
> > 
[snip]
> > ::ct="1":
> > loop:::
> > :ct gt "2":goto fini:
> > ::export WORD exp=(of):
> > ::exp(1)=1; exp(2)=2; write exp:
> > ::ct=ct+"1"; goto loop:
> > fini::end:
> 
> In my project, using a loop like this doesn't really
> fit, but I get the
> idea.  I'm a little confused though on the function
> of "write" here, and on
> what order things occur in.  In my reply to Ken, I
> included sample code
> which works without using "write".  Also, I set the
> export's field
> values and then call the export.  You're doing the
> reverse.  Does
> "export" write a record when it's called, but only
> if it's fields have
> been modified?
>
 
The "export" line should be executed before the
assignments are made.  You can think of the export
line as being similar to a free record lookup. 
Executing that statement creates a blank record - you
would then do the assignments to populate the record. 
In my example I included the "write" statement out of
habit because I often use @menu processing for
exports.  When you do this you are not guaranteed that
a write will occur unless you specifically execute the
"write" command.  However, if this were regular output
processing (not "@" processing) then the write would
occur automatically when the end statement was
reached.

As I said, I have seen your technique where you
execute a write instead of looping back on the export
line.  It seems counterintuitive to me, but apparently
it works too.

Good Luck.

Jeff Harrison
jeffaharrison at yahoo.com

Author of JHImport and JHExport. The fastest and
easiest way to create code for filePro Imports and Exports.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Filepro-list mailing list