Multiple choice technology mainframe

How many number of bytes will be utilized in the below group variable EMP-RECORD? 01 EMP-RECORD. 02 EMP-DATA1. 03 EMP-NAME PIC X(10). 03 EMP-SAL PIC 9(04). 02 EMP-DATA2 REDEFINES EMP-DATA1. 03 EMP-N1 PIC X(12). 03 EMP-N2 PIC 9(02). 02 EMP-DATA3. 03 EPT1 PIC X(02). 03 DEPT2 PIC X(02).

  1. 14

  2. 16

  3. 18

  4. 32

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

EMP-DATA1 occupies 14 bytes (10 for EMP-NAME + 4 for EMP-SAL). EMP-DATA2 REDEFINES EMP-DATA1, so it uses the same 14 bytes (12 for EMP-N1 + 2 for EMP-N2). EMP-DATA3 occupies 4 bytes (2 for EPT1 + 2 for DEPT2). Since REDEFINES shares memory with the original, only EMP-DATA1 (14 bytes) and EMP-DATA3 (4 bytes) contribute to total storage: 14 + 4 = 18 bytes. The REDEFINES clause doesn't add extra memory.