Tip of the day: Running reports from a control record
John Esak
john at valar.com
Mon Oct 15 18:26:50 PDT 2007
> > Mr. filePro,
> >
> > Very nice... why didn't you post this tip about 15 years ago? :-)
>
> Because I didn't write it until this morning, when I was asked to solve
> the problem of multiple instances running simultaneously. :-)
>
> > Meanwhile, I've been doing the following for about 15 years as well...
> how
> > does mine differ from yours substantively? Especially viz the free
> chain?
> >
> > I put the code I want to use at the top of an output table in the
> control
> > file (as yours does), like the following...
> >
> >
> > If:
> > Then: 'do all my lookups and such here, run the report
> > If:
> > Then: delete; exit
> >
> >
> > I run this without a -v table as:
> >
> > dreport filename -fp myoutput -a -u
>
> What record do you sit on? How do you handle multiple people running the
> report simultaneously?
Ahhh! And I suppose you are really asking what if there are NO records in
the file? Fair question. And there is absolutely NO good answer! :-)
I, of course, only do this on files that are true control files, which in my
case, means they actually have a control record or two in them. Sorry, I
should have checked why my code has always been working all these years, eh?
:-)
And when I looked, just now, I see that it isn't -a that I use, but -xa with
rclerk! And, I have my code @when entering the first field on a prepared
screen to do exactly what your code does in a couple lines *without* the
need of this. I should not have tried to remember what I do without
looking... :-) Gets me in trouble every time!
Thanks, as I said, your tip is some very nice code. This is a really nifty
way to get a job going for multiple users
John
More information about the Filepro-list
mailing list