Don't know what was specified for FIFO LIFO etc, I will have to check
tomorrow.

I agree about using the full key, I don't know why the full key wasn't used,
but I think that is going to be the fix. Unless there is some wierd business
logic reason for not doing so (but I doubt it!)

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Terrence Enger
Sent: 05 November 2009 21:59
To: Midrange Systems Technical Discussion
Subject: RE: Logical file order of records

On Thu, 2009-11-05 at 21:21 +0000, Neill Harper wrote:
...
The subtle difference was finally tracked down to the order that the
logical
files were returning records.
...
Both files were compiled from the same dds using the same commands params,
they don't reuse deleted records

And, I take it, the DDS did not specify the order for records with equal
keys. So both results were correct.

My knowledge of this area is old, and it may have been overtaken by
subsequent changes. But what I remember is this ...

When the system creates a LF, it will share any already-existing index
which serves the purpose. When you allow duplicate keys without
specifying duplicate key ordering, you can end up with FIFO, LIFO, or
the sequence of some other field of the record.

Just to confuse the issue a bit, restoring a LF or duplicating one, is
equivalent to creating it for the purposes here.

The short answer still applies: specify the sequence you need.

Cheers,
Terry.



-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx] On Behalf Of Crispin Bates
Sent: 05 November 2009 20:37
To: Midrange Systems Technical Discussion
Subject: Re: Logical file order of records

Neil,

It depends. What do you mean by identical data?

There was an interesting discussion on the System i network last week
regarding this.

http://forums.systeminetwork.com/isnetforums/showthread.php?t=77551

It is possible that two versions of the same physical, with the same data,

can return the data in different sequences. It really depends on what you
mean by identical data. The data may have been written in a different
sequence, one physical may have been RGZPFM'd. If REUSEDLT(*YES), then
what
sequence does the system decide to write to deleted records in?

Don't write applications that rely on data to be sequenced without
defining
that sequence as keys. SQL will never guarantee the sequence except for
what

is in the ORDER BY. Use the same approach for DDS LF's and you won't get
bitten. If you want to see records in the order they are created, the you
need a Date/Time stamp to sequence them by...

Crispin.

----- Original Message -----
From: "Neill Harper" <neill.harper@xxxxxxxx>
To: "'Midrange Systems Technical Discussion'" <midrange-l@xxxxxxxxxxxx>
Sent: Thursday, November 05, 2009 3:02 PM
Subject: Logical file order of records


If I have a unkeyed PF FILEA as follows:



Field1, Field2, Field3, Field4



I then have an LF LFA, with a non unique key of Field1,Field2,Field3



When there is more and one record with identical Field1,Field2 and
Field3
columns, what controls the order of the remaining records.



Further to this, if I had 2 copies of FILEA in different libraries with
EXACTLY the same data in would you expect LFA in both libraries to show
the
records in exactly the same order?









--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing
list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.



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.