- lookup question

Craig Tooker craig at cwtsoftware.com
Fri Jul 19 13:38:44 PDT 2013


On 7/19/13 16:20, Richard Kreiss wrote:
> Does anyone know if the is a system field or a system array that would hold the record count so I can get it in processing?
How about:

nr(8,.0) = numrecs(-)

Dash for the current file or lookup alias, as you please.

If the output is being run without an index, moving the current record 
to the last record obtained from from numrecs() and ending will do the 
trick.  Keep in mind that if the last record is not active, i.e. 
deleted, you must check for "not -" and step back by one until you get a 
valid record and then ending.

Craig


>
> Richard
>
>> -----Original Message-----
>> From: filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com
>> [mailto:filepro-list-bounces+rkreiss=verizon.net at lists.celestial.com] On
>> Behalf Of Bruce Easton
>> Sent: Friday, July 19, 2013 12:12 PM
>> To: filepro-list at lists.celestial.com
>> Subject: Re: - lookup question
>>
>> Richard, for a record number lookup, I believe the only way to speed things
>> up for this case would be if you always had a saved record number
>> "99999999" on file (not deleted).  Alternatively, you could keep an
>> automatic index built on @rn for that file and then use  "lookup   -
>> k=nr  i=?  -nl", where ? is the index letter built on @rn, to skip to the end.
>>
>> Bruce
>>
>> On 7/19/13 11:21 AM, Richard Kreiss wrote:
>>> I have a routine that uses a - lookup using a record number.  The record
>> numbers to use are located in a file which the -v selection process reads in to
>> an array and then loops through the array to select the record.
>>> When the loop hits an empty array element I set the lookup value to
>> "99999999" but the process continues to run through all of the records.
>>> Is there any way, using a record number lookup in a select process to have
>> the selection end without running through all of the records?
Clip...



More information about the Filepro-list mailing list