View previous topic :: View next topic
|
Author |
Message |
GMnaidu
New User
Joined: 29 Jan 2009 Posts: 6 Location: Chennai
|
|
|
|
Hi All,
Which command is preferred is it EVALUATE or IF in terms of CPU utilization. |
|
Back to top |
|
|
Ketan Varhade
Active User
Joined: 29 Jun 2009 Posts: 197 Location: Mumbai
|
|
|
|
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 |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
|