|
AFAIK, chain will not clear any data in the program when not found. With that say, I think chain is faster. Since setll and read require two trips. If chain is not found, it would be like setll. -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Steve Landess Sent: Wednesday, February 28, 2007 2:50 PM To: RPG programming on the AS400 / iSeries Subject: Re: CHAIN Versus SETLL and READ When Data Needed Shannon - SETLL does NOT move any data or clear any buffers - it simply positions the file cursor to be ahead of the record containing the key value specified in the KLIST. So, as far as efficiency goes, I'd say that the first example which uses SETLL (except using %EQUAL instead of %FOUND) will be much more efficient than using the CHAIN operation code, since CHAIN does perform I/O and if a record is not found it clears the buffer area. - sjl
As an Amazon Associate we earn from qualifying purchases.
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.