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



Bill,

It will, as you have found out, be in the order that it was in prior to the
re-sorting by fields C and D. So to be accurate, it didn't actually 'sort'
by A and B within same-value C and D - it just didn't disturb the original
sorted sequence.

Rory

On Thu, Aug 23, 2012 at 6:34 AM, William Howie <
William.Howie@xxxxxxxxxxxxxxxx> wrote:

Let me put this another way. I was using SQL Server to run a query. It
was sorted on, let's say, fields A and B. Then I FTP'ed it to an iSeries
file. The file I FTP'ed it to had just one field per record. I run a
program to parse the data out into individual fields in a second file.
This second file is keyed, with key fields C and D. Then I run a second
program that updates our database with this data. Since this second
program identifies the second file as keyed, I was expecting it to read the
file in the "C and D" sorting sequence, even though I was using a READ
statement instead of a SETLL and READE (which really shouldn't matter and
didn't in this case). And this is exactly what it did.

What it ALSO did was still preserve my "A and B" sequence from the
original SQL Server query. This is because within a group of records that
had the same "C and D" values, it still sorted in my "A and B" sequence as
well. My guess is this is because in a keyed file with key fields with the
same values, beyond that records are just sorted in arrival sequence, which
in my case happened to be what I wanted.

Hopefully I haven't completely confused everyone. Thanks again for all
the quick replies!

Bill

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.