× 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:46:36 -0600

Booth,

I believe that the %found would never turn off (because reade doesn't set
it).  Therefore, if the chain found a record then the loop would go on
forever.  I prefer the setll/reade combination instead of the chain because
the loop can be conditioned by %eof only.

Scott

> -----Original Message-----
> From: booth@martinvt.com [SMTP:booth@martinvt.com]
> Sent: Wednesday, September 13, 2000 11:08 AM
> To:   RPG400-L@midrange.com
> Subject:      RE: READE is confusing to me
> 
> I'm trying to learn this stuff.  Why not the code below, but like this?
> 
>      C     Key           Chain(E)  File
>      C                   DoW         (%Found Or Not %EOF) And (Not %Error)
>                  *  stuff
>      C     Key           ReadE(E)  File
>      C                   EndDo
> 
> _______________________
> Booth Martin
> Booth@MartinVT.com
> http://www.MartinVT.com
> _______________________
> 
> 
> 
> 
> "Shaw, David" <dshaw@spartan.com>
> Sent by: owner-rpg400-l@midrange.com
> 09/13/2000 09:42 AM
> Please respond to RPG400-L
> 
>  
>         To:     "'RPG400-L@midrange.com'" <RPG400-L@midrange.com>
>         cc: 
>         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
> +---
+---
| 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.