× 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: Search for a record in a file
  • From: Booth Martin <boothm@xxxxxxx>
  • Date: Mon, 23 Feb 1998 21:29:37 -0500



John Hall wrote:

> I need to search about 10 different files to see if any of them contain
> a field with a specific value.  Each file has around 200K records.  This
> is an occasional search 1 or 2 times a week.  Most of the files are
> history files and will not be added to.
>
> I only need to know if the file contains any records with this value.
>
> Question : what is the most efficient way to search these files ?
>
> I think is is probably either with an SQL statement
>

I can't speak to the SQL side of it, but if you are going to use RPG to search
all records be sure there is no K on the file spec line.  If you write your
program with an Input Primary file and the rest as Input Secondary files. Then 
an
I line, with a record type for each file, with a record indicator, and then the 
C
lines for each record type.  This method  isn't very glamorous but I have found
that it is fast.  Whether it is one program with ten files or ten programs with
one file is another issue entirely.


> John L. Hall
> Home Sales Co.



root
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MIDRANGE-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 ...

Replies:

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.