Selection date question

John Esak john at valar.com
Fri Feb 18 15:30:56 PST 2005


Boy, Jose, I am busy, but not too busy to disagree with you, sorry. Your
method here is very arcane, overly complicated and invasive in that you have
to add fields to files... My solution was dead simple, took about 6 minutes
to write and implement. Don is welcome to use (or try should I say) your
method, but I hope he waits until I can find the code I'm taking about. Take
no ffense, please, but it is far easier and dare I say it, elegant.

John



> -----Original Message-----
> From: filepro-list-bounces at lists.celestial.com
> [mailto:filepro-list-bounces at lists.celestial.com]On Behalf Of Lerebours,
> Jose
> Sent: Friday, February 18, 2005 5:21 PM
> To: Don Coleman; filePro List
> Subject: RE: Selection date question
>
>
> Don Coleman posted:
>
> >
> > I have a series of reports (3) different menu selections
> > which function
> > as follows:
> >
> > DPRODIR -K to remove previous selection criteria
> > *CLERK to add 19 different selction criteria (2 date fields
> > and 17 YESNO
> > fields)
> > *REPORT to post data from an archive file to a temporary posting file
> > *REPORT to post data from a working file to the same
> > temporary posting file
> > *REPORT to print the data with data combined from the archive and
> > working files
> >
> > The archive and working files have identical maps.  Their only
> > difference is the archive file contains orders processed previously.
> > The working file contains only open orders and those orders
> > processed on
> > a given day are archived each night.  The data posting and reports
> > function as designed.  However, since I am processing from multiple
> > files I had to post the date range fields to a control file and could
> > not simply use -R to pass the parameter.
> > Originally, only one person was running these reports.  Now however,
> > more than one person is running them and I am concerned that
> > before one
> > process is completed another person will start another process with
> > different selection criteria (-V table).  Hence the second person
> > running the report could affect the results of person #1
> > running their
> > report depending on where in the process person #1 was.  Does anyone
> > have any suggestions for isolating the record being used for
> > one person
> > only short of something like this:
> >
> > Menu selection #1 posts to record #1 in control file
> > Menu selection #2 posts to record #2 in control file
> > ...
> > This method would not work well for two people running the
> > same report
> > at the same time.  I would appreciate any better ideas.
> > Thanks and have
> > a good weekend.
> >
>
> Boy, you are busy!
>
> Well, I would venture to suggest that this can be easily
> solved if you TAG your records with a "stamp" that will
> make them unique from user to user, or even from time
> the operation was started.
>
> This is what I would do with minimun change to what
> you have:
>
> 1.  Combine your 3 options into one.  No need for three
>     menu options
>
> 2.  Create a STAMP made up of user ID, Date and Time or
>     anything that will make a unique key
>
>
>       STAMP="`logname` `date +%Y%m%d%H%M%S"
>
> 3.  Run your report/clerk passing "$STAMP" using
>     filePro standard arguments (-r -ry ...)
>
> 4.  Modify programs to use @p? to match passed parameter
>     with recorded STAMP and select/print only matching
>     records.
>
> The program responsible for collecting the date range
> will use the STAMP to identify the selection criteria.
>
> Once you print the record, you can remove the record or
> set a `cron` to erase temporary files each night.
>
> Of course, you need to change your maps to add a field
> where the STAMP will be kept.
>
> You will need to modify your selection process on the
> final report (the printing report process) to select
> records based on the STAMP.
>
> Hope this helps!
>
>
> Jose Lerebours
>
>
> _______________________________________________
> Filepro-list mailing list
> Filepro-list at lists.celestial.com
> http://mailman.celestial.com/mailman/listinfo/filepro-list



More information about the Filepro-list mailing list