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



Sorry, Charlie... I use logical files with partial keys frequently. I have never seen "strange things" happen. They work extremely well and efficiently. And in 30ish years of doing this stuff, I never met another programmer that didn't understand them.

Anything you post here, there will be a handful of people who will get it wrong, and post it that way. It doesn't matter what it is -- there's always someone.

Don't let that stop you from using useful techniques!

Honestly, I think the people here who think that the sequence is unpredictable are confusing CHAIN/SETLL/READE type operations with SQL. In SQL, if you don't specify an "order by" clause, then the sequence is unpredictable. This is not true of the native I/O opcodes.

-SK




On 3/28/2013 2:51 PM, Charles Brewster wrote:
Crispin,

I am not sure if it is just self-imposed or if I was told by someone
when I was a young programmer, but I never, never, never chain with a
partial key on a logical file. Strange things can happen and as we
see from this thread, it is confusing to the programmers that follow
behind you.

Maybe it comes down to programming "style."

In my book CHAIN is reserved for when I need to update a record in a
file, the CHAIN should use a complete key that satisfies all fields
in a unique logical file.

I use SETLL and READ/READE for everything else. (Sometimes the SETLL
is enough and you never even need to do the read, performance
bonus!)

Charlie


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.