IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Evaluate Vs IF


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
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
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
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: 8696
Location: Dubuque, Iowa, USA

PostPosted: Fri Sep 11, 2009 4:57 pm
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: 6966
Location: porcelain throne

PostPosted: Fri Sep 11, 2009 5:18 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Evaluate variable to execute a jcl step JCL & VSAM 3
No new posts Evaluate statement, when-clause in co... COBOL Programming 10
No new posts Generate report with out using IF/EVA... COBOL Programming 25
This topic is locked: you cannot edit posts or make replies. Want to put in a loop in EVALUATE COBOL Programming 24
No new posts Evaluate statement - clarification COBOL Programming 2
Search our Forums:

Back to Top