What is the difference between using AND and ALSO, when using in EVALUATE in Cobol?

Questions by skmahajan

Showing Answers 1 - 3 of 3 Answers

tag_tushar

  • Sep 23rd, 2010
 

Let me refraze your question...
The condition (AND/ALSO) & OR are 2 different things:

Ex1: OR
EVALUATE TRUE
WHEN GENDER = 'M' OR 'F' PERFORM ....
WHEN OTHER
END-EVALUATE.

Ex2: AND

EVALUATE TRUE
WHEN GENDER = 'M' AND AGE = 40 PERFORM ...
WHEN GENDER = 'F' AND AGE = 30 PERFORM ...
END-EVALUATE.

Ex3: ALSO

EVALUATE GENDER ALSO AGE
WHEN 'M' ALSO 40 PERFORM ...
WHEN 'F' ALSO 30 PERFORM ...
WHEN OTHER
END-EVALUATE.

The EVALUATE conditions AND/ALSO perform the same operation, but their syntax are different.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions