Re: IF statement, I don't understand this
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Thu, 30 Mar 2006 17:17:24 -0700
Chuck Stevens<charles.stevens@xxxxxxxxxx> 03/30/06 12:23 PM >>>
"Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx> wrote in message
news:492nekFmm166U1@xxxxxxxxxxxxxxxxx
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.
Although it's not quite so clear, "IF INTEREST-BEARING OF [or IN]
ACCOUNT-TYPE ..." is legal COBOL. Qualification in general is allowed
whether or not it is necessary to establish uniqueness of reference, and
qualification of condition-names is by the conditional-variable-names with
which they're associated.
Interesting idea! I'm not sure if I could convince anyone else to use it,
but it's certainly a thought. Currently we have fairly long 88-level names
because we try to fit in some part of what it's an 88-level of, for
instance:
10 D-MSTR-TIN-CUST-TYPE
88 MSTR-CORPORATION VALUE 'CP', 'FP'.
Not that it would make it much smaller, but we could get rid of the "MSTR-"
part of the 88 level and say:
IF CORPORATION IN D-MSTR-TIN-CUST-TYPE
PERFORM HANDLE-AS-CORPORATION.
Well, it's still pretty long, but then "IF D-MSTR-TIN-CUST-TYPE = 'CP' OR
'FP'" is pretty long also.
Thanks for the idea!
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: Chuck Stevens
- IF statement, I don't understand this
- Prev by Date: Re: Any comments?
- Next by Date: Re: IF statement, I don't understand this
- Previous by thread: Re: IF statement, I don't understand this
- Next by thread: Re: IF statement, I don't understand this
- Index(es):