Multiple choice technology mainframe

how many times Para1 will execute in the below code? 01 ws-var pc 9(1) perform para1 varying ws-var from 1 by 1 until ws-var>10

  1. 10

  2. 11

  3. 9

  4. infinite Loop

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

The variable ws-var is defined as PIC 9(1), which can only hold single-digit values (0-9). The PERFORM increments ws-var from 1 by 1 until ws-var > 10. When ws-var goes from 9 to 10, the PIC 9(1) truncates 10 to 0, then continues cycling 0-1-2-...-9-0 forever, never reaching >10. This creates an infinite loop.