IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

doubt regarding evaluate


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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: 237
Location: USA

PostPosted: Sat Mar 05, 2005 6:15 pm
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
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Evaluate variable to execute a jcl step JCL & VSAM 3
No new posts Doubt about pl/1 (job offer) General Talk & Fun Stuff 5
No new posts doubt when executing a file when logg... TSO/ISPF 2
No new posts Doubt in MFS IMS DB/DC 2
No new posts Doubt on GETMAIN, FREEMAIN behaviour CICS 3
Search our Forums:

Back to Top