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
 

 

When PARA-1 and PARA-2 will execute in Evaluate query

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Thu Jul 12, 2007 11:08 am    Post subject: When PARA-1 and PARA-2 will execute in Evaluate query
Reply with quote

Hi all,

i have following code..

EVALUATE W-NUM
WHEN 1
WHEN 2 PERFORM PARA-1

WHEN 3
WHEN 4 PERFORM PARA-2
WHEN OTHER PERFORM PARA-3

END-EVALUATE


when PARA-1 and PARA-2 will execute?
What will happen if value of W-NUM is 1?
Back to top
View user's profile Send private message

ParagChouguley

Active User


Joined: 03 Feb 2007
Posts: 175
Location: PUNE(INDIA)

PostPosted: Thu Jul 12, 2007 11:33 am    Post subject:
Reply with quote

Hi,
Quote:
when PARA-1 and PARA-2 will execute?


Para-1 will be executed if value of W-NUM is 1 or 2.
Para-2 will be executed if value of W-NUM is 3 or 4.
Para-3 will be executed for any valid value of W-NUM other than 1,2, 3 or 4.

Quote:
What will happen if value of W-NUM is 1?
Above statement answers this question.

--Parag
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3158
Location: Tucson AZ

PostPosted: Thu Jul 12, 2007 11:33 am    Post subject:
Reply with quote

From the FM:
If a WHEN phrase is selected, execution continues with the first imperative-statement-1 following the selected WHEN phrase. Note that multiple WHEN statements are allowed for a single imperative-statement-1.
Quote:
when PARA-1 and PARA-2 will execute?
When 1 or 2 and when 3 or 4 respectivly.
Quote:
What will happen if value of W-NUM is 1?
PARA-1 will execute.
Back to top
View user's profile Send private message
sudhakar_lendave

New User


Joined: 21 Nov 2006
Posts: 48
Location: mumbai

PostPosted: Thu Jul 12, 2007 11:37 am    Post subject: Re: Evaluate query
Reply with quote

Thanks Parag, thanks William.
Back to top
View user's profile Send private message
Phrzby Phil

Active Member


Joined: 31 Oct 2006
Posts: 962
Location: Richmond, Virginia

PostPosted: Thu Jul 12, 2007 9:14 pm    Post subject:
Reply with quote

This is so easy to test - why ask first?
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 JCL to Set Return code based on DB2 S... vinu78 DB2 17 Mon Mar 13, 2017 9:47 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Omegamon for DB2 query ashek15 DB2 0 Wed Feb 15, 2017 11:25 am
No new posts Query on DB2 WLM stored procedures ashek15 DB2 8 Sun Feb 12, 2017 11:13 pm


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