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
 

 

Evaluate statement multiple true conditions

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

New User


Joined: 22 Jul 2005
Posts: 24
Location: pune

PostPosted: Tue May 02, 2006 11:10 am    Post subject: Evaluate statement multiple true conditions
Reply with quote

suppose in an evaluate statement multiple true conditions are there..which one will get executed...

e.g

EVALUATE TRUE
WHEN (TIB1(WS-INDEX)= SPACES)
MOVE WS-GAIND TO TIB1(WS-INDEX)
WHEN (TIB2(WS-INDEX)= SPACES)
MOVE WS-GAIND TO TIB2(WS-INDEX)
WHEN (TIB3(WS-INDEX)= SPACES)
MOVE WS-GAIND TO TIB3(WS-INDEX)
WHEN (TIB(WS-INDEX)= SPACES)
MOVE WS-GAIND TO TIB4(WS-INDEX)
END-EVALUATE

IF TIB3 AND TIB4 ARE SPACES WHERE WILL GAIND BE PASSED
Back to top
View user's profile Send private message

Pollyannaish

New User


Joined: 09 Jul 2005
Posts: 31
Location: Pune, India

PostPosted: Tue May 02, 2006 11:56 am    Post subject:
Reply with quote

Hi

The first statement in the drop down menu which is true would be executed...

In your case as stated above

WHEN (TIB3(WS-INDEX)= SPACES)
MOVE WS-GAIND TO TIB3(WS-INDEX)
will be true before
WHEN (TIB(WS-INDEX)= SPACES)
MOVE WS-GAIND TO TIB4(WS-INDEX)

thus WS-GAIND will be passed to TIB3(WS-INDEX)

I hope this helps..
Back to top
View user's profile Send private message
kousalya26

New User


Joined: 06 Jul 2005
Posts: 21
Location: chennai

PostPosted: Tue May 02, 2006 1:25 pm    Post subject: Re: EVALUATE STAEMENT
Reply with quote

HI,

From the manual,

Quote:
The execution of the EVALUATE statement ends when:
The statements associated with the selected WHEN phrase are performed.
The statements associated with the WHEN OTHER phrase are performed.
No WHEN conditions are satisfied.


So the statement(s) following the first when condition which is satisfied will be executed and after that it goes to teh scope terminator.

Thanks & Regards,
kousalya
Back to top
View user's profile Send private message
small_world

New User


Joined: 22 Jul 2005
Posts: 24
Location: pune

PostPosted: Tue May 02, 2006 4:57 pm    Post subject:
Reply with quote

thanks guys
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 -913/-911 Deadlock during UPDATE stat... NoSleep319 DB2 5 Fri Nov 18, 2016 12:37 am
No new posts COBOL DB2 - CALL statement - high CPU... TS70363 DB2 15 Sun Sep 11, 2016 6:07 am
No new posts Converting multiple VB files to FB fi... Viswanath Reddy JCL & VSAM 6 Mon Aug 08, 2016 11:49 pm
No new posts Converting NULL column into NOT NULL ... Raghu navaikulam DB2 5 Sat Aug 06, 2016 3:45 pm
This topic is locked: you cannot edit posts or make replies. Updating value of key using rewrite s... ParminderKumar COBOL Programming 4 Thu Aug 04, 2016 12:46 am


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