|
But a compilation Listing Cross Reference does give you the usage of that indicator if you use MOVEA. If it is a large range of indicators, such as those used for complicated display files, I use to set them for their initial value, and then when testing it is on a one to one that I set them. Some subfiles programs of mine have had to use up to 4 indicators per field (RI, PC, PR, ND) and twenty or more Eval *INxx = *OFF takes a lot of space. I suppose the best way would be to have basing pointers against the indicators and update them that way, but old habits die hard. Alan Alan -----Original Message----- From: owner-rpg400-l@midrange.com [mailto:owner-rpg400-l@midrange.com]On Behalf Of Jim Langston Sent: Friday, June 15, 2001 7: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 +--- +--- | 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.