O'Reilly logo

Sams Teach Yourself COBOL in 24 Hours by Thane Hubbell

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 9The Evaluate Statement

In computer programs, it is often necessary to determine which action to take based on a complex set of conditions. You may end up coding a significant number of If statements to handle these decisions. As you nest the If statements deeper and deeper, the code can become very confusing. If you have to come back later and change the program, you may find yourself spending a lot of time just trying to figure out what you were attempting to do with all those If statements.

COBOL comes equipped with a very versatile statement as an alternative to using complex, highly nested If statements. This statement is the Evaluate statement.

When to Use Evaluate

After analyzing the decisions you need to make in your program, you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required