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



One of the IBM experts may be able to clarify, but I think the official answer is the sequence beyond the key is undefined. You may find it's what you want, but you shouldn't count on it.
--
Sean Porterfield

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of William Howie
Sent: Thursday, August 23, 2012 09:35
To: rpg400-l@xxxxxxxxxxxx
Subject: RE: Keyed file question

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

-----Original Message-----
*** NOTE: When replying to this digest message, PLEASE remove all text unrelated to your reply and change the subject line so it is meaningful.


This email is confidential, intended only for the named recipient(s) above and may contain information that is privileged. If you have received this message in error or are not the named recipient(s), please notify the sender immediately and delete this email message from your computer as any and all unauthorized distribution or use of this message is strictly prohibited. Thank you.

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.