Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ 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 -> COBOL Programming
View previous topic :: :: View next topic  
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

mdtendulkar

Active User


Joined: 29 Jul 2003
Posts: 238
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: 211
Location: Keane Inc., Minneapolis USA.

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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Doubt in MFS abdulrafi IMS DB/DC 2 Fri Oct 21, 2016 3:09 pm
No new posts Doubt on GETMAIN, FREEMAIN behaviour Arunkumar Chandrasekaran CICS 3 Sun Aug 30, 2015 9:22 pm
No new posts Doubt in using command code O Appu IMS DB/DC 4 Tue Jan 13, 2015 3:14 pm
No new posts Doubt in using command code D and N t... Appu IMS DB/DC 7 Mon Dec 29, 2014 5:52 pm
This topic is locked: you cannot edit posts or make replies. ISREDIT macro command doubt sakrat TSO/ISPF 60 Wed Feb 05, 2014 6:47 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us