IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Is a negative numeric value displayed with a "J"


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ravneet

New User


Joined: 19 Sep 2006
Posts: 1
Location: Syracuse, NY

PostPosted: Tue Sep 19, 2006 8:23 pm
Reply with quote

Is a negative numeric value displayed with a "J" at the right hand side of the value?
Back to top
View user's profile Send private message
DavidatK

Active Member


Joined: 22 Nov 2005
Posts: 700
Location: Troy, Michigan USA

PostPosted: Tue Sep 19, 2006 10:27 pm
Reply with quote

ravneet,

Yes, and No.

The 'J' represents a '1' with the sign being negative. Take a look at the code below. a 'J' is a hex 'D1', 'K' = hex 'D2' etc. A 'D' in the hex number represents a negative sign, a 'C' a positive sign and a 'F' unsigned (default positive). So, a S9(4), or S9(4) COMP-3 value of -1234 will be displayed as '123M' or hex 'F1F2F3D4'. A value of +1234 will be displayed as '123D' or hex 'F1F2F3C4'

Code:

JKLMNOPQR {ABCDEFGHI 0123456789
DDDDDDDDD4CCCCCCCCCC4FFFFFFFFFF
1234567890012345678900123456789


Dave
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Issues Converting From ZD to Signed N... DFSORT/ICETOOL 4
No new posts PuTTY - "User is not a surrogate... IBM Tools 5
No new posts Newbie Stuck on "Duplicate Datas... TSO/ISPF 5
No new posts Convert HEX to Numeric DB2 3
No new posts Find a record count/numeric is multip... COBOL Programming 1
Search our Forums:

Back to Top