Multiple choice technology mainframe

How do you declare a host variable(in COBOL) for an attribute named Emp-Name of Type VARCHAR(25) ?

  1. 01 EMP-GRP. 88 E-LEN PIC S9(4) COMP. 88 E-NAME PIC X(25).

  2. 01 EMP-GRP PIC X(25).

  3. Cannot Define.

  4. 01 EMP-GRP. 49 E-LEN PIC S9(4) COMP. 49 E-NAME PIC X(25).

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

In COBOL, VARCHAR host variables require a group item with level 49 for the 2-byte length field followed by the character data. Option D correctly uses 49 E-LEN (binary length) and 49 E-NAME (X(25) data). Level 88 is for condition names, not VARCHAR structure.