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
 
Evaluate Vs IF

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

New User


Joined: 29 Jan 2009
Posts: 6
Location: Chennai

PostPosted: Fri Sep 11, 2009 3:16 pm    Post subject: Evaluate Vs IF
Reply with quote

Hi All,

Which command is preferred is it EVALUATE or IF in terms of CPU utilization.
Back to top
View user's profile Send private message

Ketan Varhade

Active User


Joined: 29 Jun 2009
Posts: 197
Location: Mumbai

PostPosted: Fri Sep 11, 2009 3:43 pm    Post subject:
Reply with quote

It will depends on the number of condition, if the condition check are more then evaluate is bettter in terms of performace wise but its has certain limitation, check for the requirement and then you can decide
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8165
Location: East Dubuque, Illinois, USA

PostPosted: Fri Sep 11, 2009 4:57 pm    Post subject:
Reply with quote

Most importantly, why are you concerned about EVALUATE versus IF? CPU utilization is one of the last things to worry about these days when machines are executing tens of millions of COBOL instructions in one second of CPU time. If you think the job is using too much time, then you look at it -- otherwise, you don't really need to think much about it.
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


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

PostPosted: Fri Sep 11, 2009 5:18 pm    Post subject:
Reply with quote

GMnaidu,

look at the BAL generated by an IF and an EVALUATE. Your concern over 'speed' bores me.

Read the Application Programmers Manual for your version of COBOL.
There is a good explanation of the reasons when you should code an IF
and why you code an evaluate.
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 Evaluate statement, when-clause in co... UmeySan COBOL Programming 10 Mon Jul 16, 2012 6:49 pm
No new posts Generate report with out using IF/EVA... bbharathiraj COBOL Programming 25 Tue May 22, 2012 10:19 am
This topic is locked: you cannot edit posts or make replies. Want to put in a loop in EVALUATE maxsubrat COBOL Programming 24 Fri Apr 06, 2012 3:35 pm
No new posts Evaluate statement - clarification Vijay Subramaniyan COBOL Programming 2 Fri Feb 03, 2012 1:53 pm
No new posts Evaluate true also true Bill Woodger COBOL Programming 6 Thu Aug 11, 2011 7:43 pm

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