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



jeffw@xxxxxxxxxxxxxxxx wrote:

I have a question. For the last few years we have been coding chain
statements like this:

abc chain file1
    if %found(file1) and not %eof(file1)

Do we not have to use the %eof on chains? I know you have to use them on
reads? Any help would be appreciated. thank you


Jeff, you only need to test %found.

Checking %eof is either wrong or redundant.  

It's wrong prior to V5R1; chain didn't affect %eof at all.  If the file
had previously reached eof, the test would fail even if the chain found
a record.  

It's redundant starting in V5R1; chain sets off %eof(filename) if the
chain is successful, but it doesn't have any effect if the chain doesn't
find a record.  If %found(file1) is true, then "not %eof(file1)" would
also be true.  If %found(file1) is false, then it doesn't matter about
%eof(file1).


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.