<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META charset=US-ASCII http-equiv=Content-Type
content="text/html; charset=US-ASCII">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; BACKGROUND-COLOR: #ffffff">
<DIV><SPAN class=062114804-31052004>Lee, </SPAN></DIV>
<DIV><SPAN class=062114804-31052004>You're going to hate this advice... and
normally, I would jus skip over a message like yours. But, you are asking for
advice for the future and the only _good_ advice that can be offered (at least
by me) is that you should _never_ build filePro files based on @rn... not for
any reason, really. I don't know why you are doing it now, or what benefit
it gives you... but the very first thing you should do for "the future" is add a
uniqure code field to this file. Fill it with a unique number on each record and
make sure that unique number gets added to all detail records that might be
attached to these records.... I can only assume you are using record number to
attach detail records. In any case, whether or not this file has other
related files. Get out of the record number business. There is no good reason to
use the record number assigning specific ones to each new addition to the file.
Sorry, not to give any advice on what it is you actually want to do, but what
you want to do is generally, no make that always, a bad idea. </SPAN></DIV>
<DIV><SPAN class=062114804-31052004></SPAN> </DIV>
<DIV><SPAN class=062114804-31052004>I suppose I could say I'm curious and ask
why you need to do things this way, but you don't have to tell me... no need to
defend the idea... it's enough that you are doing it and feel you need to... but
I submit to you that there is _nothing_ that you can do using a
record-number-based system that can't be done far better with a unique numbered
field.</SPAN></DIV>
<DIV><SPAN class=062114804-31052004></SPAN> </DIV>
<DIV><SPAN class=062114804-31052004>John</SPAN></DIV>
<DIV><SPAN class=062114804-31052004></SPAN> </DIV>
<DIV><SPAN class=062114804-31052004>Visit The FP Room <A
href="http://www.tinyurl.com/yuag7">http://www.tinyurl.com/yuag7</A>
24/7</SPAN></DIV>
<DIV><SPAN class=062114804-31052004></SPAN> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #ffff00 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT
face=Tahoma>-----Original Message-----<BR><B>From:</B>
filepro-list-bounces+john=valar.com@lists.celestial.com
[mailto:filepro-list-bounces+john=valar.com@lists.celestial.com]<B>On Behalf
Of </B>Leefp1@aol.com<BR><B>Sent:</B> Sunday, May 30, 2004 2:51
PM<BR><B>To:</B> filepro-list@seaslug.org<BR><B>Subject:</B> creating usable
records - warning: long question<BR><BR></FONT></DIV>
<DIV>While working most of this weekend to correct a problem resulting from a
VERY stupid action on my part (a long boring story), I again ran across a
needed programming (or maybe system administration) strategy that I wonder how
others handle. I will give a simplified illustration.</DIV>
<DIV> </DIV>
<DIV>If you wanted to post information to records in a file but you wanted to
be able to select the record number to which you were posting (i.e. Not just
to any free record), how would you do it. </DIV>
<DIV> </DIV>
<DIV>I have occasionally had this need. When starting with an empty file
it is no problem. I would just add as many records needed and place an
innocent character, like a period, in a field in each record; do my posting;
then delete all the records that still only had a period as the only character
in the record. As a result, all my records are where they need to be and
now empty records are available as free records for the future.</DIV>
<DIV> </DIV>
<DIV>But this weekend I had a complication. I was not starting with an
empty file. I had a file in which the highest record number was about
48000 but it had many empty (free) records throughout (resulting from
deletions). I needed to be able to post to record numbers up to 51000 as
well as to some of the free records in the file. I THOUGHT I could find
out how many free records were in the file, and add that number to the
difference between 48000 and 51000. Say the number was 5000. I
thought I could then write a loop that for 5000 iterations would find a free
record in the file and place a period in a field in each record. My
assumption was that all of the free records below 48000 would be used as well
as the necessary number above 48000. But, to my surprise, SOME of the
free records below 48000 were used but most were not. I'm not sure why
not. My thought was maybe some of the records were not really "free,"
but even if I went to a given record number and deleted the record, my above
technique did not produce a period character in the record.</DIV>
<DIV> </DIV>
<DIV>So, my question from all this rambling... What would be the best
strategy to create usable records within a file to which one can post by
specific record number?</DIV>
<DIV> </DIV>
<DIV>Thanks for any advice for the future.</DIV>
<DIV> </DIV>
<DIV>-Lee</DIV>
<DIV> </DIV>
<DIV>BTW... finally this weekend, I copied the file to another name, deleted
key and data files in the original file, created "period" records of
sufficient quantity in the original file and then posted back from the new
file and posted my needed info all to specific record numbers.</DIV>
<DIV> </DIV>
<DIV>Also... I know that the reason I need to do such a thing is a mistake
made many years ago to use record numbers as ID numbers under certain
circumstances. I know it is not good programming, but it has not burned
me very many times and to change now would not be worth it.</DIV>
<DIV>----------------------------------------</DIV>
<DIV><FONT lang=0 face=Arial PTSIZE="10" FAMILY="SANSSERIF">Lee B.
Walker<BR>Walker & Company<BR>5307 Front Royal Drive<BR>Cross Lanes, WV
25313<BR>304.419.0013<BR>lee@walkeronline.com</FONT></DIV></BLOCKQUOTE></BODY></HTML>