Consider two data items 77 W-A PIC 9(3)V99 VALUE 23.75 77 W-B PIC ZZ9V99 VALUE 123.45 after the statement MOVE W-A TO W-B what will be W-B value? a.123.75 b.b23.75 (where b indicates space) c.023.75 d.invalid move

This question is related to TCS Interview

Showing Answers 1 - 11 of 11 Answers

shashi pai

  • Apr 26th, 2006

I dont think so. Correct answer out of 4 options should be invalid move. This code will fail in compilation itself as the value clause is not compatible with the type. If you still have doubts try it out.


  • Aug 24th, 2007

invalid will not take the values

  Was this answer useful?  Yes


  • Feb 4th, 2008

I tried this out using microfocus cobol and got that the value of W-B after move is b23.75 where b indicates space. Hence the ans is b. 

  Was this answer useful?  Yes


  • Sep 8th, 2009

The answer is b. b23.75

w-A: 9(3)v99  = 23.75
w-B  zz9v99   = 123.45


Z is replaced with Blank so output be, b.

refer cobol ref book mk roy, page no 76.


  • Jun 30th, 2010

Answer is :  b23.75
Bacause W-A 's original value is 023.75
           & W-B's original value is  123.45

After moving W-A's value to W-B Z replaces the 0 as blank.

  Was this answer useful?  Yes

Cathy Saunders

  • Jul 1st, 2012

b.b23.75 (where b indicates space)

  Was this answer useful?  Yes

Lalit Pant

  • Jul 10th, 2014

option b

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.


Related Answered Questions


Related Open Questions