Multiple choice technology mainframe

In the statement given below,control is transferred to Which Para when value of X is 2 GOTO A,B,C,D DEPENDING ON X

  1. PARA A

  2. PARA B

  3. PARA C

  4. PARA D

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

The COBOL GOTO statement with DEPENDING ON uses 1-based indexing: GOTO A,B,C,D DEPENDING ON X transfers control to the first label when X=1, second label when X=2, third when X=3, fourth when X=4. When X=2, control transfers to PARA B. This is a computed GOTO based on the ordinal position of the labels.