message: 1
date: Wed, 28 Feb 2007 15:04:47 -0600
from: "Lim Hock-Chai" <Lim.Hock-Chai@xxxxxxxxxxxxxxx>
subject: RE: CHAIN Versus SETLL and READ When Data Needed 

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. 

From the manual:

When the CHAIN operation is successful, the file specified in name is positioned
such that a subsequent read operation retrieves the record logically following 
or
preceding the retrieved record. When the CHAIN operation is not completed
successfully (for example, an error occurs or no record is found), the file 
specified
in name must be repositioned (for example, by a CHAIN or SETLL operation)
before a subsequent read operation can be done on that file.


Just so no one is lead astray, if a CHAIN fails, the pointer is undefined and 
any read operation will results in an error.

Marvin



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.