Importing into an empty file (was Re: ASCII Import)
Kenneth Brody
kenbrody at bestweb.net
Tue Jul 13 13:14:00 PDT 2004
"Jay R. Ashworth" wrote:
[...]
> > Simply take your import routine from output processing, and place it in an
> > input table under the @MENU event. Then replace your END with EXIT. When
> > you run this process in *clerk, your import routine will be run when the
> > @MENU event is triggered on startup (even with no records in the file),
> > and your EXIT will exit *clerk after all the records have been imported.
> >
> > Because @MENU is not sitting on any record, there is no need to populate
> > the file with a dummy record, as is needed when run from output processing.
>
> Suggestion: since this is a useful programming pattern, and since it's
> counterintuitive to do it from dclerk, could we get an @START for
> dreport that fires in the same place? Or won't that work because,
> finding no records in the file, dreport won't ever get that far?
Since there are no records to select, sort/select processing won't ever
be run. And with no records selected, @ONCE won't run either.
--
+-------------------------+--------------------+-----------------------------+
| Kenneth J. Brody | www.hvcomputer.com | |
| kenbrody at spamcop.net | www.fptech.com | #include <std_disclaimer.h> |
+-------------------------+--------------------+-----------------------------+
More information about the Filepro-list
mailing list