qualifier

fp at casabellagallery.com fp at casabellagallery.com
Thu Aug 2 07:47:01 PDT 2007


JP posted:

> 
> Jose Lerebours propounded (on Tue, Jul 31, 2007 at 06:48:26PM -0700):
> | JP posted,
> | 
> | > So far as I know, the only way to add qualified files is to run ddefine
> | > for each database.
> | > 
> | > When there are more that a handful of them, this gets real tiring.
> | > 
> | > Has anyone concocted a script to add a qualifier to every database?
> | 
> | http://www.fpgroups.com/index.php?Target=code
> | 
> | Please let me know if you find this script useful.
> 
> I don't know who wrote that script, but please tell him or her that it's
> really not very useful, because 
> 	

You already have, I wrote it ... :)

> 	1) It limits a new qualifier to three characters, instead of
> 	    filePro's limit of seven.
> 

I wrote this script a very long time ago and I wrote it so that key[*] 
and data[*] were transferable to DOS version of filePro where the 
qualifier was not allowed to be more than 3 characters in length.

I am not sure if this is the case with WIN/DOS versions of filePro now
at days, but I am pretty sure it was back then.

> 	2) It *duplicates* the base unqualified files, with all of their
> 	   existing data.  Maybe somebody might want that once in a blue
> 	   moon, but when one adds a new qualifier, should one expect it
> 	   to come with records already present?

It does not duplicate the base qualifier.  It very specifically creates
blank key and data files

> $A/key$1
> $A/data$1

It does, however, copies the indexes [A-Z], I always anticipated the fact
that filePro will eventually have more than 16 automatic indexes ...

You see data because after creating the qualifier, you went and looked at
a file via "4. Index Selection" or something identical and accessed an
automatic index which is not blank.

Evidently you did not read the note I also posted where I mention the need
to "rebuild" your indexes ... Here is the note directly from the fpgroup.com
link

Posted By: Jose Lerebours  |  On: 07/31/2007
Don't forget to rebuild your indexes if necessary.  Since I do not use the 
NONE qualifier, I never worried about it.


That said, if you need your qualifier to be longer than three characters,
you can simply edit the script and (a) remove this session of code, or
(b) increase the size check digit to seven.

You can simply add a line after you copy the indexes like so:

dxmaint $A -e -ra -m $1 -h "Indexing $A - Qualifier $1"


I am glad you took the time to look at the script and given it a shot. I
am sorry I was not cleared enough in bringing to your attention its
shortcomings.  I hope that with this, it all makes sense and you can now
put it to use.

Hope all is well with you!


Jose Lerebours



More information about the Filepro-list mailing list