Importing into an empty file (was Re: ASCII Import)

Kenneth Brody kenbrody at bestweb.net
Tue Jul 13 10:23:58 PDT 2004


"Shuman, Mike" wrote:
> 
> I am doing the Delete of all records and Import via a user menu.
> If I use ddir to zero the file prior to running the import, don't I need
> a dummy record to
> stand on to do the import with free record lookup?
> If so, how do I create this dummy record with out user involvement?
[...]

Assuming that you are within the file you are importing into (as opposed
to posting to a different file), then you can do this even with no records
in the file.

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.

-- 
+-------------------------+--------------------+-----------------------------+
| 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