× 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.



Justin,

And (COLUMN4 = :local4 or :local4 = '');

That's just a way to express "if local4 is not empty, test it". Allows
selection on COLUMN4 to be optional based on the zero length value of
local4.







On Thu, Jun 28, 2018 at 7:53 AM Justin Taylor <JUSTIN@xxxxxxxxxxxxx> wrote:

I've never heard of user indexes, but it sounds like what I'm looking
for. I found the API's for reading and writing. There was a performance
warning about auto-flushing to disk, but I don't imagine that would be a
problem since I’d only be writing once a day.

My final condition, "And (COLUMN4 = :local4 or :local4 = '');" would be an
issue. I'm not sure what the point of that was, so I'm going to have to
research it.



-----Original Message-----
From: Mark S Waterbury [mailto:mark.s.waterbury@xxxxxxxxxxxxx]
Sent: Wednesday, June 27, 2018 7:52 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Faster key lookup

Justin,

Create a User Index, and read the file, and use the MI built-in
instruction INSINXEN to insert index entries into that *USRIDX object, and
then your look-up procedure can just use the MI built-in FNDINXEN
instruction.

This should be very fast. You can even "pin" the *USRIDX object in a
memory pool, by using the SETACCST MI instruction, or using the SETOBJACC
command.

Then, once a day, or as needed, just refresh the contents -- probably
simplest to just delete and recreate the whole *USRIDX object.

Hope that helps,

Mark S. Waterbury

--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L)
mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related
questions.

Help support midrange.com by shopping at amazon.com with our affiliate
link: http://amzn.to/2dEadiD

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.