IF vs Evaluate Numeric And Alpha Compare in COBOL
Photo by AbsolutVision on Unsplash

This post is useful for COBOL developers. When you compare Numeric to Alpha-numeric, both behave differently. This post explains it with examples.

1. Evaluate Logic

01 MONTH_NUM pic 9(01) value 1.
Evaluate MONTH_NUM
WHEN ‘1’
Perform Jan-section
WHEN other
Perform None-section.

When you execute the above logic, the flow goes to WHEN OTHER. The reason is it checks for exact values (Numeric). Also, the Evaluate does not convert to Unicode. That means Numeric and Alphanumeric values mismatched.

2. IF Logic

IF month_num = ‘01’
Perform Jan-section
Perform None-section

When you execute the above logic. It converts, both numeric and alpha to Unicode, and will Perform Jan-section.

To find the difference between IF and Evaluate and use it in your programs correctly.



The top tokenization servers are vault and vault-less. I have shared the differences between these two.

Tokenization Top Two Servers
Photo by Victor Barrios on Unsplash

Vault Server

In simple terms, vault means it has a database. So it stores all the card numbers and Tokens.

Vault-less Server

A vault-less server means it is just a generator. It does not store any details. So the customer card details are more secure.

I have given more classic examples and the best references. You need a lot of effort to get those. But on your behalf, I did for you.

Here is my article on the Vault and Vault-less server.