Multiple choice technology programming languages

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

To store an 8-character date format such as YYYYMMDD in standard text format, COBOL requires an alphanumeric definition of 8 bytes, which is represented by Pic X(8). Other choices are invalid COBOL syntax or define incorrect data formats.