× 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: READE is confusing to me
  • From: Scott Mildenberger <Smildenber@xxxxxxxxxxxx>
  • Date: Wed, 13 Sep 2000 11:09:37 -0600

Or you can just replace the CHAIN with a SETLL/READE on then the loop is DOW
not %eof(file), that is how we change ours.

Scott Mildenberger

> -----Original Message-----
> From: Shaw, David [SMTP:dshaw@spartan.com]
> Sent: Wednesday, September 13, 2000 7:42 AM
> To:   'RPG400-L@midrange.com'
> Subject:      RE: READE is confusing to me
> 
> Mark,
> 
> On the contrary, I think the BIFs are quite consistent.  The confusion is
> the result of our long habit of using the same indicator number for
> different functions in different op-codes.  It makes perfect sense to me
> that a CHAIN would result in a %FOUND/NOT %FOUND and a READE would result
> in
> a %EOF/NOT %EOF, and that these are different things.  However, after
> using
> *IN90 for more than 10 years in both functions, it's disconcerting to have
> to change one's thinking.  If we explicitly do what the indicators did
> implicitly, though, I think the code actually becomes more understandable.
> Consider a priming read loop done like this:
> 
>      D EndLoop         S               N
> 
> 
>      C     Key           Chain(E)  File
>      C                   Eval      EndLoop = Not %Found(File)
> 
>      C                   DoW       Not EndLoop
> 
>       *  stuff
> 
>      C     Key           ReadE(E)  File
>      C                   Eval      EndLoop = %EOF(File)
> 
>      C                   EndDo
> 
> When I first tried to use the BIFs, it annoyed me that I couldn't just
> substitute %EOF for *INxx, but it actually makes a whole lot more sense to
> me to use something like EndLoop, mapped explicitly to the contextually
> correct BIF.  What do you think?
> 
> Dave Shaw
> Spartan International, Inc.
> Spartanburg, SC
> 
> -----Original Message-----
> From: M. Lazarus [mailto:mlazarus@ttec.com]
> 
> At 9/11/00 08:05 AM -0400, you wrote:
> >%Equal is used on Setll or Lookup
> 
>   I think that the implementation of these BIFs makes them 
> inconsistent.  Even though there was considerable thought behind it, I 
> think it ended up being misguided.  I think that they s/b consistent for 
> ALL I/O opcodes.  This means that all CHAIN's and READx's should have 
> %Found and %EOF available.
> 
>   Does anyone else find the implementation confusing?
> 
>   -mark
> +---
> | 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
> +---
+---
| 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-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.