Multiple choice technology mainframe

Take a look at the following variable declarations. What will be the content of RESULT at the end of the series of MOVE instructions? 01 ELE-1 PIC X(5) VALUE 'ELRI'. 01 ELE-2 PIC X(10). 01 ELE-3 PIC X(2). 01 RES PIC X(5). MOVE 'TABLE' TO RES MOVE ELE-1 TO ELE-2 MOVE ELE-2 TO ELE-3 MOVE ELE-3 TO RES

  1. ELbbb (bbb = 3 blancs)

  2. TABLE

  3. TABEL

  4. ELBLE

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

COBOL MOVE operations truncate on the right. ELE-1 has 'ELRI' (5 chars). Moving to ELE-2 (X10) pads right with spaces: 'ELRI '. Moving ELE-2 to ELE-3 (X2) takes leftmost 2 chars: 'EL'. Moving ELE-3 to RES (X5) pads right with 3 spaces: 'EL ' (E followed by 3 blanks). RES initially had 'TABLE' but was overwritten.