Multiple choice technology

In DATA DIVISION the entries are 01 BILL. 02 A PIC 99. 02 FILLER PIC X(7). Indicate which one of the following statement in the Procedure division is correct

  1. MOVE ZEROS TO A.

  2. MOVE SPACE TO FILLER.

  3. MOVE SPACES TO A.

  4. MOVE ‘AB’ TO A.

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

Option A is correct because A is defined as PIC 99 (numeric field), so MOVE ZEROS TO A is valid. Option B is wrong because it should be 'SPACES' (plural) not 'SPACE'. Option C is wrong because you cannot move SPACES (alphanumeric) to a numeric field. Option D is wrong because you cannot move an alphanumeric literal 'AB' to a numeric field.