Multiple choice technology mainframe

You store it as YYYYMMDD in 8 bytes. What is the COBOL definition of this field?

  1. Pic Y(4)M(2)D(2)

  2. Pic date(yyyymmdd)

  3. Pic date(8)

  4. Pic X(8)

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

When storing YYYYMMDD as 8 bytes in COBOL, you use PIC X(8) because it's stored as alphanumeric character data, not as a numeric or date type. The DATE format verb doesn't exist in this syntax, and Y/M/D format is not valid for PICTURE clauses.