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



Nope, just double checked on V5R2. If you create them in the wrong order (A,
A+B, A+B+C) there is no sharing. 

Keep in mind too, you don't need to recreate the logical, just the index, so
a RMVM/ADDLFM works.

Given:
LF_A - Keyed Field1
LF_B - Keyed Field1, Field2
LF_C - Keyed Field1, Field2, Field3

If you create them in the wrong order (LF_A then _B then _C) LF_A owns
index_A and LF_B owns index_B and LF_C owns index_C.

If you then you RMVM/ADDLFM on LF_B it will share the index from LF_C -
makes sense.

Additionally, if you then delete LF_C the index ownership will revert to
LF_B. So far so good. 

If you then recreate LF_C it will share the index in LF_B. So, when the
index moved from LF_C to LF_B when you deleted _C it retained it's full key
structure even though it was owned by a LF that didn't need the structure. 

I wonder if there is a way to see the indexes on a system.

Also, remember FIFO, LIFO, FCFO are all considered "keys", to get sharing
you need to leave the ordering unspecified.

-Walden


------------
Walden H Leverich III
President & CEO
Tech Software
(516) 627-3800 x11
(208) 692-3308 eFax
WaldenL@xxxxxxxxxxxxxxx
http://www.TechSoftInc.com 

Quiquid latine dictum sit altum viditur.
(Whatever is said in Latin seems profound.)
 
-----Original Message-----
From: jt [mailto:jt@xxxxxx] 
Sent: Tuesday, February 17, 2004 6:20 PM
To: RPG programming on the AS400 / iSeries
Subject: RE: Efficient Code

Icbw, but my understanding is that the system creats implicit *ACCPTH
sharing automatically, regardless of which order the *LF were created.  ?
Pretty sure it used to, but that's iirc.

| -----Original Message-----
| [mailto:rpg400-l-bounces@xxxxxxxxxxxx]On Behalf Of Walden H. Leverich
| III

| I've seen cases where index sharing was _possible_, but no one
| had done what
| was needed to enable it. If you have 4 logicals, keyed:
|
| A
| A, B
| A, B, C
| A, B, C, D
|
| And you created them in that order you'll have 4 indexes, but if
| you created
| them in the reverse order you'll have one. _BIG_ performance
| difference. It
| can be worth it to examine the logicals for index sharing
| possibilities too.



_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
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-Ups:

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.