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

Jay R. Ashworth jra at baylink.com
Tue Jul 13 13:27:51 PDT 2004


On Tue, Jul 13, 2004 at 04:14:00PM -0400, Kenneth Brody wrote:
> "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.

Ok, then, would it be useful in contexts *other* than the present one
to have a processing label that is guaranteed to run, before *any*
other processing, from a report?  Anyone?  I can see a use for it:
audit logging that someone tried to *run* a report.

Cheers,
-- jra
-- 
Jay R. Ashworth                                                jra at baylink.com
Designer                          Baylink                             RFC 2100
Ashworth & Associates        The Things I Think                        '87 e24
St Petersburg FL USA      http://baylink.pitas.com             +1 727 647 1274

	"You know: I'm a fan of photosynthesis as much as the next guy,
	but if God merely wanted us to smell the flowers, he wouldn't 
	have invented a 3GHz microprocessor and a 3D graphics board."
					-- Luke Girardi


More information about the Filepro-list mailing list