× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: "extract" command enhancement (subfiles and BIFs)
  • From: Chris Bipes <ChrisB@xxxxxxxxxxxxxxx>
  • Date: Fri, 24 Sep 1999 10:33:46 -0700

For what its worth.  To advance 10,000 records means to skip the next 10,000
records in the file not counting the deleted records that might be
incountered inbetween.  Go to record number 10,000 means go to that record
number, if it is deleted, goto the next record available.  If I am searching
a file and want to skip the next x records, I add the current record number
+ x and position to that record.  PDM does not do this because you are
telling it to skip the next x live records.  It has to read then all so it
can skip the deleted records and not count them.



-----Original Message-----
From: Jim Langston [mailto:jlangston@conexfreight.com]
Sent: Friday, September 24, 1999 7:15 AM
To: RPG400-L@midrange.com
Subject: Re: "extract" command enhancement (subfiles and BIFs)


Hmm... I've noticed something similar when using display on a database file
(option
5 using PDM).  If I type +10000 on a large file, it takes a long time to
move to that
record, but if I type in the record number I want to go to directly, it goes
there almost
instantaneously.

This method does require that you can read an array element (record number)
almost
immediately, otherwise you will have the problem you described, the OS reads
every
record from one to what you're looking for, then you give it a new record #
and it
reads one to this new record number all over again.

How are you reading the 4096th record from your file?

Regards,

Jim Langston

David Morris wrote:

> Jim,
>
> I recently spent some time trying to optimize a page by page subfile
positioning
> routine.  I started by reading every 4096th record until I hit a greater
key and then
> went back/forth by half until I hit 1 or the key.  Worked pretty good, but
it was slower
> than my sequential search which just read every 64th record and then
backed up
> when it found a key greater.  I found out that with a scrollable cursor,
to get the
> record n records away the system actually performed I/O for all of the
inner
> records.  Seems odd to that the system performs I/O when simply counting
index
> entries would do.
>
> David Morris

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator:
david@midrange.com
+---
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.