| Chuck Stevens 2004-03-26, 10:59 pm |
| I haven't seen the original message; I'm citing from Michael's response.
There's also the (very) old-fashioned way, using "abbreviated combined
relation conditions":
IF ORDER-ITEM-SERIES = '1' OR '2'
PERFORM FIRST-DISC
ELSE IF ORDER-ITEM-SERIES = '3' OR '4' OR '5'
PERFORM SECOND-DISC.
Note that the first END-IF in the example has a period after it, which means
that the second one should receive a syntax error. And as presented
there's a missing OR after '4'.
Note also that I'm not a fan of abbreviated combined relation conditions,
but they have been a supported feature of COBOL for a very, very long time
and, carefully used, they can be useful.
-Chuck Stevens
"Michael Mattias" <michael.mattias@gte.net> wrote in message
news:f3s3c.32217$PY.28391@newssvr26.news.prodigy.com...
>
>
> EVALUATE ORDER-ITEM-SERIES
> WHEN "1" THRU "2"
> DO THIS
> WHEN "3"
> WHEN "4"
> WHEN "5"
> alternate to "3" THRU "5"
> WHEN OTHER
> PERFORM OH-MY-GOODNESS-AN-UNEXPECTED-VALUE
> END-EVALUATE
>
> MCM
>
>
|