Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 972
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 How to force a select query to abend neo4u DB2 5 Mon Apr 23, 2018 1:36 pm
No new posts Query to compare 2 values of 1 column... Poha Eater DB2 13 Fri Mar 09, 2018 10:45 am
No new posts How to replace the below query? pkmurali DB2 12 Tue Feb 27, 2018 9:51 pm
No new posts Need Guidance regarding UPDATE query Poha Eater DB2 3 Mon Feb 12, 2018 11:35 pm
No new posts Query to skip Max time-stamp and fetc... vickey_dw DB2 8 Sun Jan 28, 2018 1:09 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us