Need a clever way to load all the qualifier names...
Nancy Palmquist
nlp at vss3.com
Thu Jun 9 10:53:35 PDT 2005
Mike Schwartz wrote:
> I am writing some master reports that will need to access all the
> available qualifiers and I need a clever solution that will let me read
> in all of the qualifier names for a given file. This is running in
> filePro 5.0.06 on SCO Openserver.
>
>
>
> For example, in the "custmast" customer master file, and there are
> qualifiers for each of the several dozen manufacturing plant locations;
> IE the qualifiers are detroit, grnbay, omaha, etcetera, and I need to
> load each of the qualifier names into a loop of lookup commands using
> something like custmast@{qu where qu equals detroit, grnbay, omaha, etc.
>
>
>
> Opendir-nextdir commands work OK, but they are tedious to write and
> there isn't a mask for qualifiers, so they tend to require a lot of disk
> I/O. (Some of the filePro files I am working with have hundreds of
> files in them, mostly selects, like se.ltty230, sel.tty942,se.lpeteb,
> etcetera that I have to weed through to find the key files.) I am going
> to have to do this for numerous reports, so I need something that is
> simple to implement and runs as quickly as possible, because I am
> feeding this data out to web browsers in response to sales rep queries,
> so transaction time will be critical.
>
>
>
> Wishlist: Maybe I will submit something to the wishlist to request
> a mask for qualifier names in the opendir command, but I don't know
> whether that will speed the opendir command up very much…
>
>
>
> I can't depend on the file named "qualify" in each of the filePro
> subdirs, because the key and data files might have been copied in from
> another server, rather than built through the filePro main menu. IE,
> the "qualify" file is usually wrong or non-existant. However, if any of
> you have a script that can loop through all of the filePro
> subdirectories and recreate the "qualify" file in each subdir, perhaps I
> could run something like that as a "cron" job. Actually, I could
> probably do this from within filePro once a week or once a month using
> OpenDir, but I would hate to miss any new locations in the interim.
> (There are over 500 filePro files on about a dozen servers, so I would
> rather not do this by hand…)
>
>
>
> There are dozens of filePro reports that I am going to have to
> modify to become web transactions, so I am interested in any ideas or
> scripts that any of you have developed to make this process more efficient.
>
>
>
Mike,
I have exactly this programming done for searching prior years. We
archive by year.
The way I did it was to create a filePro data base called "qualyear".
It is never 'qualified'. I add a record for each qualfier with the
following fields:
Qualfier Code: det
Description: Detroit Branch
Sort: (use this to create an order for the file to be processed)
Mine is for years so it looks like this:
Qualfier Code: 98
Description: Year 1998
Sort: 1998 - without this the 98 would be after the 03 qualfier
instead of before.
Then I load that into a listbox or just read thru the records when I
need to look at all files.
When they add a record to the qualyear file, it will create the new
qualifier in all files that need it, and generate the new indexes.
Quite a savings.
I have built this into a few of my applications. Having a database
makes it possible to allow the end user to select a qualfier in a
listbox, run reports once for each qualfier, etc.
I use this in one of my classes so if you would like a sample of the
code, let me know.
Nancy
--
Nancy Palmquist MOS & filePro Training Available
Virtual Software Systems Web Based Training and Consulting
PHONE: (412) 835-9417 Web site: http://www.vss3.com
More information about the Filepro-list
mailing list