---
title: "The Purpose of ‘When Other’ in COBOL EVALUATE"
description: "These are the basic reasons why when other is needed in COBOL evaluate"
url: https://srinimf.com/2016/09/24/how-to-control-cobol-evaluate-logic/
date: 2016-09-24
modified: 2026-10-10
author: "Srini"
image: https://i0.wp.com/srinimf.com/wp-content/uploads/2016/09/pexels-photo-3771074.jpeg?fit=1880%2C1204&ssl=1
categories: ["COBOL"]
tags: ["Why when other is Mandatory in EVALUATE"]
type: post
lang: en
---

# The Purpose of ‘When Other’ in COBOL EVALUATE

The **Evaluate **statement reduces code effort of writing multiple-if statements. Here, you’ll find the purpose of ‘**WHEN OTHER’** in the EVALUATE statement.

Related[COBOL ‘EVALUATE ALSO’ Best Examples](https://srinimf.com/2020/04/28/evaluate-also-example/)

## Evaluate Syntax

The syntax for evaluate is:

```
EVALUATE TRUE
    WHEN  CONDITION
          PERFORM  PARA1
    WHEN OTHER
         continue
END-EVALUATE.
```

### When Other in Evaluate..

Why “when other ” you need [to write](https://srinimf.com/2021/10/02/how-to-write-if-conditions-correctly-and-vs-or/) in **evaluate**?

the reasons are simple:

- This avoids ambiguity to the compiler.
- If the conditions are not matched, it helps what action it has to take. 
- During Numeric or character validations, you may get data, [which is](https://srinimf.com/2016/04/10/synonyms-in-db2-deprecated-the-alternative-is-alias/) not expected. So you need a piece of code in WHEN OTHER to handle these.

Related Posts

- [COBOL Evaluate: How to Write Multiple When Conditions](https://srinimf.com/2016/04/17/cobol-evaluate-multiple-when-conditions/)DateApril 17, 2016
- [2 More things on Advanced COBOL Programming](https://srinimf.com/2015/06/10/2-more-things-on-advanced-cobol-programming/)DateJune 10, 2015
- [COBOL ‘EVALUATE ALSO’ Best Examples](https://srinimf.com/2020/04/28/evaluate-also-example/)DateApril 28, 2020

References

- [Structured COBOL Programming](https://www.amazon.in/Structured-Cobol-Programming-8ed-Stern/dp/8126511877/?tag=srinimf-21)

### Share this:

-
- [Tweet](https://twitter.com/share)
- [![](https://i0.wp.com/assets.pinterest.com/images/pidgets/pinit_fg_en_rect_gray_20.png)](https://www.pinterest.com/pin/create/link/?url=https%3A%2F%2Fsrinimf.com%2F2016%2F09%2F24%2Fhow-to-control-cobol-evaluate-logic%2F&media=https%3A%2F%2Fi0.wp.com%2Fsrinimf.com%2Fwp-content%2Fuploads%2F2016%2F09%2Fpexels-photo-3771074.jpeg%3Ffit%3D1200%252C769%26ssl%3D1&description=The%20Purpose%20of%20%27When%20Other%27%20in%20COBOL%20EVALUATE)
-
- [Share on Tumblr](https://www.tumblr.com/share)
- [Share on WhatsApp (Opens in new window) WhatsApp](https://srinimf.com/2016/09/24/how-to-control-cobol-evaluate-logic/?share=jetpack-whatsapp)
- [More](#)
-

- [Print (Opens in new window) Print](https://srinimf.com/2016/09/24/how-to-control-cobol-evaluate-logic/?share=print)
- [Share on Reddit (Opens in new window) Reddit](https://srinimf.com/2016/09/24/how-to-control-cobol-evaluate-logic/?share=reddit)
- [Share on Telegram (Opens in new window) Telegram](https://srinimf.com/2016/09/24/how-to-control-cobol-evaluate-logic/?share=telegram)
- [Email a link to a friend (Opens in new window) Email](mailto:?subject=%5BShared%20Post%5D%20The%20Purpose%20of%20%27When%20Other%27%20in%20COBOL%20EVALUATE&body=https%3A%2F%2Fsrinimf.com%2F2016%2F09%2F24%2Fhow-to-control-cobol-evaluate-logic%2F&share=email)
-

### Like this:

Like Loading…
