Multiple choice technology mainframe

Can a field X(10) be redefined with S9(12).

  1. (A) Yes

  2. (B) No

  3. NA

  4. Na

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

In COBOL, REDEFINE is valid if the new definition doesn't exceed the original byte count. X(10) is a 10-byte alphanumeric field. S9(12) is a signed numeric field occupying (12+1)/2 = 6.5, rounded to 7 bytes for sign nibble storage, which is less than 10 bytes. The REDEFINE is valid, though the remaining bytes would be unused.