Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
doubt regarding evaluate

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL
Author Message
srimsc_ibmmainframes

New User


Joined: 17 Feb 2004
Posts: 19
Location: pune

PostPosted: Sat Mar 05, 2005 12:49 pm    Post subject: doubt regarding evaluate
Reply with quote

what will happen in each of the following cases1.EVALUATE some-expression
WHEN OTHER
PERFORM some-paragraph-name
WHEN 1
PERFORM some-paragraph-name
WHEN 2...........
END-EVALUATE.
SO WHAT WILL HAPPEN IN THIS CASE?



2.EVALUATE some-expression
WHEN 1
PERFORM some-paragraph-name
WHEN 2 <--------------------(ASSUME THAT HERE NO IMPERATIVE STATMENT IS SPECIFIED N THIS WHAEN IS SATISFIED )
WHEN 3
PERFORM some-paragraph-name
WHEN OTHER
PERFORM some-paragraph-name
END-EVALUATE.


SO WHAT WILL HAPPEN IN THIS CASE?
PLZ REVERT ME BACK ASAP
Back to top
View user's profile Send private message
References
mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 257
Location: USA

PostPosted: Sat Mar 05, 2005 6:15 pm    Post subject:
Reply with quote

srimsc_ibmmainframes,

Quote:
In first scenario everytime the WHEN OTHER conditon is executed


Quote:
In Second scenario what ever condition satisfied (WHEN 1 or WHEN 2/3) is executed. If non of the above condition is satisfied WHEN OTHER will be executed.

Try coding a simple program to test this.

For more information have a look at the following link.

COBOL Programming Guide

Hope this helps

Regards
Mayuresh
Code:
Back to top
View user's profile Send private message
ovreddy

Active User


Joined: 06 Dec 2004
Posts: 200
Location: Keane India Ltd., Hyderabad

PostPosted: Mon Mar 07, 2005 3:19 pm    Post subject:
Reply with quote

Hi Reddy,

Its not fair of asking for the output of a program. You can execute this on your own and see. If u r unable to understand the results. Then you can ask ... I got some X results instead of some Y.

Then we will try to analyze and answer more properly. Please every one avoid posting these type of questions.

* Execute on your own and get back to me with your results, then I will explain.

Bye,
Reddy.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> Mainframe COBOL All times are GMT + 6 Hours
Page 1 of 1