Dennis said,
"eliminate all references to *IN indicators."
Why are the intelligent iSeries people so against the simpler aspects
of RPG. I confess that I prefer to use the simpler conventions in RPG
because they are simple to use.
Well, I cannot say why *intelligent* iSeries people are so against numbered
indicators, but I can say why *I* am. :)
Actually, let me change that. I'm actually not opposed to numbered
indicators per se. Some of the things I'm opposed to that can be avoided by
changing to named indicators are:
> Code that cannot be understood unless some mysterious alternate source
(in this case, DDS specs) is available to me, and which I must peruse
Frequently while trying to develop my code. When I set on *IN47, how
do I know what effect that really has? When I want to set an error
indication on Order Date, which indicator is that again?
> Code whose impact is not clearly legible. The hazard of the maintainer
who wonders, "What is the harm if, in my subroutine, I happen to use
*IN47 as an READ or CHAIN indicator? It's *my* subroutine, and I
didn't
Notice the indicator being used elsewhere."
> Having to keep track of the purpose of up to 100 meaningless
numbers, when there is an alternative answer
> Having to analyze (at least) to sources in order to determine if such-
and-such an indicator is available for general use
That's enough for starters, and it's just the short list. Mind you, in my
past (and truth told, some of it not too distant when doing minor
maintenance) I have been very successful with both approaches (numbered and
unnumbered). But in the grand scheme of things, the named-indicator
approach is so much better. And since this routine is obviously new to you,
it seemed (to me) that it deserved a complete new approach.
You speak of simplicity when defending numbered indicators. Forgive me but
that is a conflict in concepts. Which is simpler to understand? :
If subfile_end and processing_updates ;
Or
If *IN97 and not *IN43 ;
It's so very easy to switch; there are many techniques for this that make it
automatic and simple.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"Some people can stay longer in an hour than others can in a week."
-- William Dean Howells
As an Amazon Associate we earn from qualifying purchases.