Multiple choice technology mainframe

what will be the output when i)pic 9(6) value 000178 is moved to pic 9(3)V9(3). ii)pic 9(3)V9(3) value 123.456 is moved to pic 9(6).

  1. 000.178 & 000123

  2. 178.000 & 000123

  3. 000.178 & 123456

  4. 000.000 & 000000

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

In COBOL, when moving PIC 9(6) VALUE 000178 to PIC 9(3)V9(3), the decimal is inserted after 3 digits from the right: 178.000. When moving PIC 9(3)V9(3) VALUE 123.456 to PIC 9(6), the decimal portion is truncated (not rounded): 000123. Option B correctly shows both transformations.