Record number

Kenneth Brody kenbrody at spamcop.net
Wed Sep 25 16:37:20 PDT 2013


On 9/25/2013 11:13 AM, Richard Kreiss wrote:
> This may be a Ken question:
>
> A while back I seem to remember there was a discussion of the record number size.  For many years we were told that the record number was (8,.0).  This record size would only allow 99,999,999 records.  After that, the record number would be greater than 8 digits.  So any programming that might use rn(8,.0) would have problems with an extremely large database.  It was indicated that somehow filePro could handle values larger than 8 digits for a record number.

If the file has more than 99,999,999 records, @RN will be (10,.0) for that file.

> What has bothered me is how the program can properly handle this unless @rn is used for record number up to 8 digits and somewhere else there is another value that contains the larger number.
> 	1. Does @rn have a variable size based on the recode # - (8,.0) or (10,.0)?

Yes.  See above.

> 	2. If 1 above is true, would rn(len(@rn),Edit(@rn)) hold the correct value for the record number?

I don't have a file with that many records on this system, and I don't 
recall.  I believe that, if the file has more than 99,999,999 records at 
compile time, the above would create it with (10,.0).

However, is there any reason not to use "rn(10,.0)" all the time?  (Unless 
you are cramped for space on the screen/report.)

> 	3. If not,  how would one handle this if one needed to do a record # lookup?

It doesn't matter.  Even "rn(2,.0)" would suffice if you never needed to go 
beyond record 99.  In fact, it doesn't even need to be numeric, and "(2,*)" 
would work just as well for a record number lookup.

As mentioned above, you can always use "(10,.0)" for the definition.

-- 
Kenneth Brody


More information about the Filepro-list mailing list