Multiple choice technology

In the following entries which is valid entry

  1. 02 Amount pic “$ZZZZ9.99”
  2. 02 UNDER-LINE PIC X(132) VALUE IS ALL *

  3. 03 FILLER PIC X(40) VALUE “SPACES”

  4. 03 A PIC X (6) VALUE 123456

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

Option C is valid COBOL syntax: FILLER with PIC X(40) and VALUE in quotes. Option A is invalid because '$' cannot appear in a PIC clause - PIC clauses use only format symbols like 9, X, Z, etc. Option B is invalid because 'VALUE IS ALL *' is not correct COBOL VALUE clause syntax. Option D is invalid because a VALUE clause for an alphanumeric PIC X field must be a quoted string, not a numeric literal 123456.