Re: IF statement, I don't understand this



Bottom posting

Frank Swarbrick wrote: (message snipped)
I'm a fan of 88-levels for that reason alone, as well as the fact that they
can make code more readable. Who knows what codes "L', "R", and "S" mean in
this case. But with a sensibly named 88-level (which I don't have because I
don'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 may
"lose" the field name itself, but... It would perhaps be nice of 88-level
usage 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 me
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.

Robert

.