Re: Data Name = to more than one number
docdwarf_at_panix.com
Date: 02/10/04
- Next message: William M. Klein: "COBOL quoate"
- Previous message: docdwarf_at_panix.com: "Re: Data Name = to more than one number"
- In reply to: Howard Brazee: "Re: Data Name = to more than one number"
- Next in thread: Richard: "Re: Data Name = to more than one number"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 10 Feb 2004 14:26:33 -0500
In article <c0b5ne$p05$1@peabody.colorado.edu>,
Howard Brazee <howard@brazee.net> wrote:
>
>On 10-Feb-2004, docdwarf@panix.com wrote:
>
>> 05 ORDER-ITEM-SERIES PIC X VALUE SPACES.
>> 88 VALID-SERIES-VALUE VALUES '1', '2', '3', '4', '5'.
>> 88 ITEMS-PRICED-NORMALLY VALUES '1', '2'.
>> 88 ITEMS-ON-SALE VALUES '3', '4'.
>> 88 ITEMS-DISCOUNTED-OTHER VALUE '5'.
>>
>> ...
>> EVALUATE TRUE
>> WHEN ITEMS-PRICED-NORMALLY
>> PERFORM NORMAL-PRICE-RITUAL THRU NPR-EX
>> WHEN ITEMS-ON-SALE
>> PERFORM SALE-PRICE-RITUAL THRU SPR-EX
>> WHEN ITEMS-DISCOUNTED-OTHER
>> PERFORM OTHER-DISCOUNT-RITUAL THRU ODR-EX
>> WHEN NOT VALID-SERIES-VALUE
>> PERFORM INVALID-ITEM-SERIES THRU IIS-EX
>> END-EVALUATE.
>>
>> (arguments about other aspects of the code given - upper case versus mixed
>> case, PERFORM THRU versus PERFORM, etc. - might best be left to other
>> threads)
>
>I have mixed feelings about defining in 88 levels. I do it a lot, but am aware
>that the code is removed from the EVALUATE enough that it can be missed:
>
>e.g.
>There is a danger that a maintenance programmer won't notice what happens when a
>value gets multiply assigned when someone adds '05' to ITEMS-PRICED-NORMALLY.
Assuming no code-review, no testing, no oversight for a two-year
programmer whatsoever...
... I do not see how this possibility is any greater than a maintenance
programmer not noticing a value getting multiply assigned in hard-coded
conditions; the advantage to the 88s is that changes are made in one
place only.
DD
- Next message: William M. Klein: "COBOL quoate"
- Previous message: docdwarf_at_panix.com: "Re: Data Name = to more than one number"
- In reply to: Howard Brazee: "Re: Data Name = to more than one number"
- Next in thread: Richard: "Re: Data Name = to more than one number"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|