Re: IF statement, I don't understand this
- From: docdwarf@xxxxxxxxx ()
- Date: Fri, 31 Mar 2006 10:40:15 +0000 (UTC)
In article <1143781234.779764.202290@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Richard <riplin@xxxxxxxxxxxx> wrote:
When I use 88 levels, I like their names to have the same root as the
data-name to which they apply, .e.g.
One of the reasons that I dislike 88 levels is that sometimes I need to
search for all uses of a variable using, say, grep, and the 88 levels
hide this usage. Certainly if the condition names were qualifed this
would avoid the problem entirely, but how would one guarantee that it
had been done in every case.
It might be done the same way that many things in many shops 'had been
done in every case', enforced by standard and code review. This is
insufficient? Welcome to the human race, where nothing is absolutely
certain in every case, including this statement.
Using the root name on the condition does
allow searching as long as the root is sufficiely unique.
But I tend to not use 88 levels at all because the various values are
still in the program even if they are localised and not in PD. I
prefer to have such data values in a 'decode file' which can be
modified by the user as required to suit changing needs.
For example the 'interest-bearing' example should (IMHO) be done by
having the interest rate in a file where authorized people can change
it and you find out if this is interest bearing or not by testing the
rate for zero. If the attribute of 'not interest bearing' is actually
not related to a zero rate then some other flag in the record should
say 'Y' or 'N' (or equivalent). Building codes such as 11, 21, 31, 41
into the program in PD or in 88s is just not good practice, except for
generating programmer job security.
Hmmmmm... leaving aside the quasi-religious war of 'No Hardcoded Values in
the Procedure Division versus No Hardcoded Values in Working-Storage' this
brings up the difficulties of *any* sort of maintenance. If the values
are in the code then the code will need to be maintained, an unpleasant
prospect. If the values are in files then the files have to be
maintained... and I've found that ensuring accurate routine file
maintenance can be almost as difficult as ensuring routine program
maintenance. I cannot count how many times I've heard:
'This report's all wrong, the values are off, your program must have
screwed up!'
'Let me see... the program hasn't been compiled in several years... ahhhh,
there it is, you ran it using last month's parameters/values, you didn't
change them to this month's.'
'Well... don't let it happen again!'
DD
.
- Follow-Ups:
- Re: IF statement, I don't understand this
- From: Richard
- Re: IF statement, I don't understand this
- References:
- IF statement, I don't understand this
- From: Jack Benny
- Re: IF statement, I don't understand this
- From: Frank Swarbrick
- Re: IF statement, I don't understand this
- From: Robert Jones
- Re: IF statement, I don't understand this
- From: Richard
- IF statement, I don't understand this
- Prev by Date: Re: IF statement, I don't understand this
- Next by Date: Re: Any comments?
- Previous by thread: Re: IF statement, I don't understand this
- Next by thread: Re: IF statement, I don't understand this
- Index(es):
Relevant Pages
|