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



Another vote for USER INDEX !!
You can define it in a data sturcture in your program so it can be in effect
like a multiple occurance data sturcture, but it can be like an array that
is dynamic in that you can add or remove entries from it as needed.  You can
access it in any fashion you want - almost like a database file.
Less overhead than a database file, more flexable than an array.
Why would anyone use anthing else.

-----Original Message-----
From: Gary Guthrie [mailto:garyguthrie@charter.net]
Sent: Wednesday, October 16, 2002 10:29 AM
To: rpg400-l@midrange.com
Subject: Re: Dynamic Arrays


Regarding the efficiency of array processing... Things have changed
since the early days. Sequenced (ascend/descend) arrays no longer use
sequential lookup. They instead take advantage of binary search, a
pretty darn fast mechanism.

Regarding the use of files... There is considerable associated overhead.
User index is a much more efficient approach and I see that Steve here
sometimes uses them, too. The user index approach takes care of the need
to redimension and in an efficient manner.

Gary Guthrie



Steve Landess wrote:
>
> I am total agreement with you, Booth.  IIRC, array processing is one of
the
> most inefficient things that you can do in an RPG program.
>
> I don't see a reason to use such a large array in a program.  I typically
> use a user index or create a work file in QTEMP with the necessary PF keys
> and/or LGL files to process the data when the number of elements gets very
> large.  It may take a little more code, but using one of these techniques
is
> much more efficient than using a large array.  Plus, using a work file is
> definitely dynamic, since you can specify SIZE(*NOMAX) when creating the
> file.

_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@midrange.com
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/cgi-bin/listinfo/rpg400-l
or email: RPG400-L-request@midrange.com
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.




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.