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



Hi Mike,

I have a physical file, when I add records to it via
the RPG prog. they are not sorted. The key is
co,div,acct.

A keylist is used to control the access path of a file, not the physical sequence in which the file is sorted. When you read the file by key, you will get it in the correct sequence. If you just view the physical data, it won't be in sequence, because you're not going by key.


yet the new records go to the back of theline, rather
than where they sb.

I have no idea what "back of the line" means? On a file that doesn't reuse deleted records, the records should always be added to the very end. On a file that does re-use deleted records, they should go in the spot where the deleted record was.

Again, when you read the data using the keys, you'll get it into keyed sequence.

If you want to physical sort the file according to it's keyed sequence, use RGZPFM with KEYFILE(*FILE) to physically reorganize the file into keyed sequence. However, there's really no advantage to doing that unless the physical sequence matters for some reason.

If I've misinterpreted your question, please clarify what you meant.

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.