|
I separate SETLL/CHAIN from the various READ* because you use a different BIF to test results. %found() (or %equal()) vs %eof(). So if
lgoodbar wrote:
It "reads" wrong to me. To me CHAIN implies an intent to retrieve one
row and only one row, while SETxx/READE implies an intent of reading a
group of rows (1+). I also do not like mixing CHAIN as the prime and
READx as the looping construct. It looks like a mixed metaphor.
It's more personal preference than anything, likely due to starting with
RPG/IV (mid-1990s).
-----Original Message-----
Loyd Goodbar wrote:
IMO, chain is the wrong tool for looking at files with duplicate keys.I've
only used chain when key values are unique, or SETxx and READxx for
duplicate-keyed files. Know your data...
Why? Especially for duplicate keys, CHAIN plus READE can work great. The CHAIN not only does the SETLL but also a 'priming' READ for a loop. Just wondering why it should be avoided.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.