|
Just a note about how to find where and how your fields/indicators are being used,.. If you look at the compilation output,.. in the Cross Reference section, you'll find all of the fields and indicators used and how, (if) they're used. Thus if the indicators 41 & 42 are defined and/or modified, you'll see them there, e.g.
*IN41 N(1) 174200 189700
*IN50 N(1) 174600 190300
*IN89 N(1) 629300M 629900M 754500M 755000M
Where the sequences to the right are the source line References (D=Defined M=Modified).
HTH,
By the way,... this is in no means an argument for or against this methodology, just a friendly reminder.
Regards,
Jon A. Erickson
Sr. Programmer Analyst
800.COM Inc.
1516 NW Thurman St
Portland, OR 97209-2517
Direct: 503.944.3613
Fax: 503.943.9313
Web: http://800.com
-----Original Message-----
From: Jim Langston [mailto:jimlangston@conexfreight.com]
Sent: Friday, June 15, 2001 4:10 PM
To: RPG400-L@midrange.com
Subject: Re: MOVEA -> EVAL
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 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.