× 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: MOVEA -> EVAL
  • From: Jim Langston <jimlangston@xxxxxxxxxxxxxxxx>
  • Date: Fri, 15 Jun 2001 16:10:28 -0700
  • Organization: Pacer International

Hmm.. I would have to argue, however, that MOVEA is not the "best"
solution in this case.  The "best" solution is to either get rid of
the indicators altogether (bad indicators, bad!) or set them thus:

C             Eval    *IN41 = *Off
C             Eval    *IN42 = *Off

Why?  Maintainability.  I'm maintaining a huge program.  I want to use a
new indicator or see where one is used, such as *IN42.  So what do I do?
I hit F10, type 42 and press F16 to search for 42.  And I find out where
indicator 42 is used (and a lot of line number 42's, etc...).

Using your method, I would be oblivious to the fact that, in the first case
*IN42 is in fact being used and is being turned off, and in the second case
is being used and is being turned on.

If I ran across this code in a program I was maintaining I would immediately
replace the code with Eval  *IN41 = *Off etc...

On a related note, S36 code conversation to native RPG and RPGIV would be
much, much easier if programs didn't use all kinds of tricks.

Regards,

Jim Langston

Me transmitte sursum, Caledoni!

Peter Dow wrote:
> 
> Hi Barbara,
> 
> I ran across this piece of code today, and while I realize this isn't the
> "best" solution, it was pretty common in pre-RPGLE days:
> 
> C                   MOVEA     '0000'        *IN(41)
> Set indic.
> 
> In the days when a lot of indicators were required to do things with a
> display file, this was a common technique to turn off a range of indicators.
> It could also be used to both seton and setoff indicators within a range,
> e.g.
> 
> C                   MOVEA     '01010101'    *IN(41)
> Set indic.
> 
> which reduced two SETON/SETOF statements to a single line of source code.
> 
> Thought you might be interested.
> 
> Peter Dow
> Dow Software Services, Inc.
> 909 425-0194 voice
> 909 425-0196 fax
+---
| 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:
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.