IBM MAINFRAME HELP & SUPPORT FORUMS
Technical Forums for IBM Mainframe Applications like COBOL, JCL, CICS, DB2, FileAid, DFSORT, Endevor, Xpediter, CoolGen, CA-7&11, AbendAid, IMS, IDMS, PL/I, MqSeries, SyncSort, Assembler, ChangeMan, Easytrieve, InterTest, REXX, CLIST etc...
 

Query Regarding EVALUATE

THIS IS AN ARCHIVE FORUM: CLICK HERE TO GO TO THE ORIGINAL TOPIC

 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
View previous topic :: View next topic  
Author Message
bipinpeter



Joined: 18 Jun 2007
Posts: 47
Location: pune

Posted: Wed Sep 24, 2008 3:53 pm    Post subject: Query Regarding EVALUATE  

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  
anil.csk



Joined: 22 Oct 2007
Posts: 15
Location: Noida

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

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  
arcvns



Joined: 17 Oct 2006
Posts: 750
Location: Chennai, India

Posted: Wed Sep 24, 2008 5:19 pm    Post subject:  

Evaluate is an easily understandable replacement for Nested-IF conditions.
Back to top  
santy



Joined: 19 Jul 2007
Posts: 5
Location: mumbai

Posted: Thu Sep 25, 2008 12:38 pm    Post subject:  

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  
Anuj D.



Joined: 22 Apr 2006
Posts: 2218
Location: Phoenix, AZ

Posted: Thu Sep 25, 2008 1:27 pm    Post subject:  

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  
dbzTHEdinosauer



Joined: 20 Oct 2006
Posts: 1633
Location: germany

Posted: Thu Sep 25, 2008 2:29 pm    Post subject:  

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  
Terry Heinze



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

Posted: Mon Sep 29, 2008 1:33 am    Post subject:  

"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  
 
       IBMMAINFRAMES.com - IBM Mainframe Support Forums Index -> Mainframe COBOL
Page 1 of 1
THIS IS AN ARCIVE FORUM IN READ ONLY MODE. IF YOU WANT TO ASK YOUR DOUBTS USE THE ACTUAL FORUM