Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

display numeric item incorrectly

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
View previous topic :: :: View next topic  
Author Message
frankvhe

New User


Joined: 22 Jun 2005
Posts: 2

PostPosted: Wed Jun 22, 2005 8:41 am    Post subject: display numeric item incorrectly
Reply with quote

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

icon_mad.gif
Back to top
View user's profile Send private message

kvivek

New User


Joined: 09 May 2005
Posts: 51
Location: Singapore

PostPosted: Wed Jun 22, 2005 2:31 pm    Post subject:
Reply with quote

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
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Display ZEDLMSG without Pressing F1 &... anandgbe CLIST & REXX 8 Thu Dec 15, 2016 4:20 pm
No new posts Sort records based on numeric field. Alks SYNCSORT 2 Wed Oct 19, 2016 10:14 pm
No new posts How to display value of an exit param... lind sh CICS 2 Sun Oct 09, 2016 12:28 pm
This topic is locked: you cannot edit posts or make replies. DSList (3.4) cannot display Chinese c... jacobdng TSO/ISPF 4 Wed Oct 05, 2016 2:51 pm
No new posts Casting a Binary Number to Numeric in... Bob Steinkraus Java & MQSeries 6 Tue Aug 09, 2016 5:58 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us