× 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: R: RPG Indicators
  • From: "David Morris" <dmorris@xxxxxxxxxxxxx>
  • Date: Tue, 18 Apr 2000 15:49:47 -0600

Jon,

The problem I have with this is that it is not consistent.  I realize that it 
can't be changed now, 
but I wonder what the perceived advantage was to using separate values.  When 
was the last 
time you needed to know if a record was found on the setll preceding the last 
read?  I have been 
using resolved values for all file/record operations for a couple of years now 
and have found 
that it is simpler and less likely to lead to an error.

David Morris

>>> Jon.Paris@hal.it 04/18/00 01:04PM >>>


 >>  I come back to indicators.  What do you think about this?

I think that there is no reason to use indicators at all any more except where
dictated by the compiler (e.g. LOOKUP) and even then you don't have to _use_ the
indicator afterwards, it is only needed to qualify the operation.

I'm not sure why so many people seem to be confused over the use of %Found.  The
built-ins map on a one-to-one basis with the old indicators, so it is all very
straightforward.  %Found is only set by operations that can set the "No Record
Found" (NRF) indicator (e.g. CHAIN).  Since READC does not set the NRF indicator
it does not set %Found either.

The basic plan is this:

%EOF - set whenever the EOF indicator would have been set.

%Error - set when the (E) extender is used _and_ the error indicator would have
been set

%Found - the opposite of the NRF indicator - set when the indicator would have
been off and vice-versa

+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.