Multiple choice technology mainframe

How many comparisons can a single COBOL if statement make? (A single comparison would be is MYVALUE > 7, for example)

  1. 1

  2. 2

  3. There is no limit

  4. COBOL if statements are not used to compare variable values

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

A COBOL IF statement evaluates a single condition at a time. While you can combine conditions using AND/OR connectors, the fundamental IF construct makes one comparison decision. For multiple independent comparisons, you need nested IFs.