Re: Data Name = to more than one number
From: Joe Zitzelberger (joe_zitzelberger_at_nospam.com)
Date: 02/11/04
- Next message: LX-i: "Re: Data Name = to more than one number"
- Previous message: docdwarf_at_panix.com: "Re: Data Name = to more than one number"
- In reply to: JerryMouse: "Re: Data Name = to more than one number"
- Next in thread: LX-i: "Re: Data Name = to more than one number"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 10 Feb 2004 18:46:55 -0500
In article <t9GdnW0kV7Sbj7Td4p2dnA@giganews.com>,
"JerryMouse" <nospam@bisusa.com> wrote:
> You make a good point. However, it must be noted that 88 levels are a
> half-assed attempt at logic and are to be avoided by right-thinkers. I say
> "half-assed" because they only address half the logic problem.
>
> For example:
>
> IF TIME-FOR-SUBTOTAL
> PERFORM SUB-TOTAL
> MOVE '0' TO WHITHER-SUBTOTAL <== WTF is "0"?
> END-IF
>
> Really should be:
> IF TIME-FOR-SUBTOTAL
> PERFORM SUB-TOTAL
> MOVE NOT-TIME-FOR-SUBTOTAL TO WHITHER-SUBTOTAL
> END-IF
It appears that you did a half-assed job when you define the condition:
01 PIC X.
88 TIME-FOR-SUBTOTAL VALUE '?'.
88 NOT-TIME-FOR-SUBTOTAL VALUE '#'.
Would give you what you are looking for and avoid that magic '0' that
nobody knows the meaning of (in a non-trivial, non-simple example).
Thus, the full-assed example would look like:
IF TIME-FOR-SUBTOTAL
PERFORM SUB-TOTAL
SET NOT-TIME-FOR-SUBTOTAL TO TRUE
END-IF
> Even this tastes like a diet softdrink. Much clearer would be the construct:
>
> IF TIME-FOR-SUBTOTAL OF WHITHER-SUBTOTAL
> PERFORM SUB-TOTAL
> MOVE NOT-TIME-FOR-SUBTOTAL TO WHITHER-SUBTOTAL
> END-IF
You can actually do "88-conditon-name OF parent-group-item [OF
parent-group-item...]" if you feel strongly about it.
- Next message: LX-i: "Re: Data Name = to more than one number"
- Previous message: docdwarf_at_panix.com: "Re: Data Name = to more than one number"
- In reply to: JerryMouse: "Re: Data Name = to more than one number"
- Next in thread: LX-i: "Re: Data Name = to more than one number"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]