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 Join in SQL Query vickey_dw DB2 2 Tue Jan 17, 2017 12:15 am
This topic is locked: you cannot edit posts or make replies. MQ setup query mohitsaini Java & MQSeries 4 Sun Jan 08, 2017 1:53 am
No new posts DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQL query to run through list of valu... Ni3-db2 DB2 14 Wed Dec 14, 2016 9:52 am
This topic is locked: you cannot edit posts or make replies. Db2 SQL query to convert rows into co... subratarec DB2 5 Thu Nov 17, 2016 4:51 pm


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