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
 

 

Query Regarding EVALUATE

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

Active User


Joined: 18 Jun 2007
Posts: 208
Location: Cochin/Kerala/India

PostPosted: Wed Sep 24, 2008 3:53 pm    Post subject: Query Regarding EVALUATE
Reply with quote

Hi all,
I've a doubt in usage of EVALUATE.
In which case we can use EVALUATE and in which case we can use if.
Which one is more effective in basis of performance?

Regards,
Bipin Peter
Back to top
View user's profile Send private message

anil.csk

New User


Joined: 22 Oct 2007
Posts: 16
Location: Noida

PostPosted: Wed Sep 24, 2008 4:40 pm    Post subject: Reply to: Query Regarding EVALUATE
Reply with quote

the better way to use Evaluate when your are going to handle the more than 2 or 3 Condition ..

IF you can use where there ARE only 2 or three condition.
Back to top
View user's profile Send private message
Arun Raj

Moderator


Joined: 17 Oct 2006
Posts: 2180
Location: @my desk

PostPosted: Wed Sep 24, 2008 5:19 pm    Post subject:
Reply with quote

Evaluate is an easily understandable replacement for Nested-IF conditions.
Back to top
View user's profile Send private message
santy
Warnings : 1

New User


Joined: 19 Jul 2007
Posts: 22
Location: mumbai

PostPosted: Thu Sep 25, 2008 12:38 pm    Post subject:
Reply with quote

Evalutate is mostly useful at the time of Nested-IF conditions,

When in your program more that 3-4 conditions u have to handle then it is good option to replace IF with Evaluate condition.
Back to top
View user's profile Send private message
Anuj Dhawan

Senior Member


Joined: 22 Apr 2006
Posts: 6258
Location: Mumbai, India

PostPosted: Thu Sep 25, 2008 1:27 pm    Post subject:
Reply with quote

Hi Bipin,

I would rather ask - why would this be your concern ? Did you try something & it didn't work out ? What research you have done so far ?
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Thu Sep 25, 2008 2:29 pm    Post subject:
Reply with quote

if you have a question about what instruction is more efficient, why do you not look at the object code generated (can be found in compile listing).
Back to top
View user's profile Send private message
Terry Heinze

JCL Moderator


Joined: 14 Jul 2008
Posts: 1239
Location: Richfield, MN, USA

PostPosted: Mon Sep 29, 2008 1:33 am    Post subject:
Reply with quote

"Which one is more effective in basis of performance?"
Although still important in a few specific cases, due to CPU speeds nowadays, I'd be more concerned with readability (maintainability) than saving a few microseconds of time.
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