View previous topic :: View next topic
|
Author |
Message |
frankvhe
New User
Joined: 22 Jun 2005 Posts: 2
|
|
|
|
declared two numeric item
item-on-hand pic s9(5).
item-sold pic s9(5).
in the procedure division
... ...
subtract item-sold from item-on-hand.
... ...
display item-sold.
I did it in z/OS. the correct answer should be 05390
but what I got is 0539{
when the right answer should be 10543
what I got is 1054C
any comments or ideas on what is the problem?
thanks in advance
|
|
Back to top |
|
|
kvivek
New User
Joined: 09 May 2005 Posts: 51 Location: Singapore
|
|
|
|
This is due to sign bit(S). Declare another variable WS-DISPLAY PIC -9(05).
MOVE item-sold TO WS-DISPLAY and display WS-DISPLAY.
Regards,
Vivek |
|
Back to top |
|
|
|