Criteria Evaluation Routine Specifications

Support for OS/VS COBOL, VS COBOL II, COBOL for OS/390 & VM and Enterprise COBOL for z/OS

Re: Criteria Evaluation Routine Specifications

Postby BillyBoyo » Wed Nov 16, 2011 3:48 pm

If you stick to a simple approach, I think it can be done without too much stuff.

The order of precedence is the order they appear. Dumb, but easy to code for. The OR+ thing is dumb, but easy to code for (ignore the OR+ completely and just treat what follows as a new line).

You have

field name
comparative operator
logical operator

I'd make a table with five items, including a "sequence number" for the input record. Split the input into groups of four (remembering your first-only and last-in-sequence will only have three) and store them in a table under a sequence number. Give the stuff after the OR+ a seperate sequence number and just process as normal otherwise.

Read your input. Match to the table, respecting the sequence numbers.

They only want TRUE/FALSE as output, so give them that, but also do a seperate dataset with the input record causing the match (if there was) (and therefore store it, little bit to do the OR+) the sequence number causing the match (if there was) or a nice message for no match - and of course printing the input data that the match was attempted against. Give them this dataset as your results. Make it difficult to assess quickly, but have all the information there - have the TRUE/FALSE pages ready as well :-)
Global moderator
Posts: 3735
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 254 times

Re: Re: Criteria Evaluation Routine Specifications



Return to IBM Cobol


  • Related topics
    Last post