Code Comments
Programming Forum and web based access to our favorite programming groups.> "KL" <klbjornme@aol.com> wrote in message > news:e7ccb54b.0402092010.1baa8164@posting.google.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
Post Follow-up to this messageI 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 > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.