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…