View previous topic :: View next topic
|
Author |
Message |
srimsc_ibmmainframes
New User
Joined: 17 Feb 2004 Posts: 19 Location: pune
|
|
|
|
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 |
|
|
mdtendulkar
Active User
Joined: 29 Jul 2003 Posts: 237 Location: USA
|
|
|
|
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
|
|
Back to top |
|
|
ovreddy
Active User
Joined: 06 Dec 2004 Posts: 211 Location: Keane Inc., Minneapolis USA.
|
|
|
|
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 |
|
|
|