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


  • Subject: Re: CHAIN vs. SETLL (was Re: DOW vs DOU)
  • From: Dave Mahadevan <mahadevan@xxxxxxxx>
  • Date: Thu, 05 Jun 1997 11:25:46 -0400
  • Organization: Stoner and Associates

Steven Easton Mail wrote:
> 
> Even on the early models of the AS400, the chain with a PARTIAL key did not
> work exactly the same as the SETLL.  The chain would use any record that
> matched the search criteria depending on what was in the unspecified fields
> & RRN.  This same bug was found in early releases of the SETLL function on
> the S/38.  You could get around it by specifying all key field on either
> command if the file was unique keyed.  Unspecified key fields were not set
> to low values before the chain.  Yes, some times I still code around old
> bugs like this, and I occasionally  set off indicators before I do a read
> equal.  Remember that the record number is the last key of every indexed
> file.  Some files do not have a unique index.  Therefore the SETLL (early
> 38) and chain (38 & early 400) had problems with reading all records in
> these files.  If you can't trust a function to work all the time, don't use
> it all.  When you have been burned bad enough, you stay away from the fire.
>
I think the bug still exists on S/36 compatible RPG.  It caused me
headaches to figure this out. It was not pretty when users complained
that few checks for the client never showed up on the screen.   I even
complained to IBM.  Of course, "it was working as designed" was the
classic response.  The best way for non-unique key files is still READE
instead of CHAIN.  My personal preferance is a SETLL followed by a READ
in a DOW (let us not start that again).


-- 
Thank You.

Regards

Dave Mahadevan.. mailto:mahadevan@fuse.net
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* This is the Midrange System Mailing List!  To submit a new message,   *
* send your mail to "MIDRANGE-L@midrange.com".  To unsubscribe from     *
* this list send email to MAJORDOMO@midrange.com and specify            *
* 'unsubscribe MIDRANGE-L' in the body of your message.  Questions      *
* should be directed to the list owner / operator: david@midrange.com   *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *


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.