what is the result when two conditions are true in evaluate



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

what is the result when two conditions are true in evaluate

Postby mcharitha » Sun Jan 18, 2015 7:39 am

what is the result when two conditions are true in evalute .........??
ex:  variable=5
   evaluate variable
   when variable>2
   display '-------'
   when variable=5
   display '-------'
   when other
   display '*****'
   end-evaluate.


Code'd
mcharitha
 
Posts: 3
Joined: Sat Jan 17, 2015 9:08 pm
Has thanked: 4 times
Been thanked: 0 time

Re: what is the result when two conditions are true in evalu

Postby BillyBoyo » Mon Jan 19, 2015 12:33 am

The manual describes how EVALUATE works.

With your code, it doesn't matter much. You have the same DISPLAY for greater than two and equal to five anyway.

What happened when you tried it? Not sure? DISPLAY someting different for the condition, then you'll know even if you didn't read the manual.

These users thanked the author BillyBoyo for the post:
mcharitha (Mon Jan 19, 2015 6:03 am)
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times


Return to IBM Cobol

 


  • Related topics
    Replies
    Views
    Last post