Re: IF statement, I don't understand this
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 17:18:58 -0700
Robert Jones<rjones0@xxxxxxxxxxx> 03/30/06 3:18 PM >>>
Bottom postingthey
Frank Swarbrick wrote: (message snipped)
I'm a fan of 88-levels for that reason alone, as well as the fact that
incan make code more readable. Who knows what codes "L', "R", and "S" mean
because Ithis case. But with a sensibly named 88-level (which I don't have
maydon't know what "L", "R" and "S" mean!) it can be quite readible, from a
business logic standpoint. Of course there is the disadvantage that you
88-level"lose" the field name itself, but... It would perhaps be nice of
meusage could be "tweaked" a bit so that we could have something like...
01 ACCOUNT-TYPE PIC 99.
88 INTEREST-BEARING VALUES 11, 21, 31, 41.
88 NON-INTEREST VALUES 10, 20, 30, 40.
IF ACCOUNT-TYPE IS INTEREST-BEARING
PERFORM CALCULATE-INTEREST
END-IF
A bit more verbose, which I'm generally not in favor of, but it seems to
to have no other downsides.
Frank
When I use 88 levels, I like their names to have the same root as the
data-name to which they apply, .e.g.
01 ACCOUNT-TYPE PIC 99.
88 ACCOUNT-INTEREST-BEARING VALUES 11, 21, 31, 41.
88 ACCOUNT-NON-INTEREST VALUES 10, 20, 30, 40.
Indeed, this is what we (try to) do also. I just didn't happen to do it in
my example.
Frank
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
.
- References:
- IF statement, I don't understand this
- From: Jack Benny
- Re: IF statement, I don't understand this
- From: Howard Brazee
- Re: IF statement, I don't understand this
- From: Chuck Stevens
- Re: IF statement, I don't understand this
- From: Frank Swarbrick
- Re: IF statement, I don't understand this
- From: Robert Jones
- IF statement, I don't understand this
- Prev by Date: Re: IF statement, I don't understand this
- Next by Date: Re: Constants, Static, Public, Private
- Previous by thread: Re: IF statement, I don't understand this
- Next by thread: Re: IF statement, I don't understand this
- Index(es):