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
 

 

Signed float variable representation

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

New User


Joined: 12 May 2009
Posts: 2
Location: Chennai

PostPosted: Wed Jun 24, 2009 4:25 pm    Post subject: Signed float variable representation
Reply with quote

Hi,
I have a doubt in sign notation. If we are moving a S9(16)V99 COMP-3 to a S9(16)v99 we are getting the lastbyte somewhat different. For example i have moved -15.98 to sign variable. If we display it, its showing as 159Q.
What does this Q represent. Will it include both sign bit and the last digit 8.
Back to top
View user's profile Send private message

dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 24, 2009 4:37 pm    Post subject:
Reply with quote

1. any COBOL manual (programmers guide) will (in painful detail) explain exactly how numerics are stored in COMP-3(Packed-decimal), numeric display and even float (single and double) datatypes.

2. the following table will help you determining the value of 'overprint', or zoned-decimal representation:
Code:
0   {    
1   A
2   B
3   C
4   D
5   E
6   F
7   G
8   H
9   I
-0   }
-1   J
-2   K
-3   L
-4   M
-5   N
-6   O
-7   P
-8   Q
-9   R
Back to top
View user's profile Send private message
Bill O'Boyle

CICS Moderator


Joined: 14 Jan 2008
Posts: 2502
Location: Atlanta, Georgia, USA

PostPosted: Wed Jun 24, 2009 4:55 pm    Post subject: Reply to: Signed float variable representation
Reply with quote

Dick,

Hex representation would have made the OP think a little more. icon_smile.gif

Regards,
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8002
Location: Bellevue, IA

PostPosted: Wed Jun 24, 2009 5:32 pm    Post subject:
Reply with quote

Quote:
Hex representation would have made the OP think a little more
Bill: you're presuming a bit much from someone who couldn't be bothered looking in the manual! icon_smile.gif
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6966
Location: porcelain throne

PostPosted: Wed Jun 24, 2009 5:43 pm    Post subject:
Reply with quote

Quote:
Hex representation would have made the OP think a little more


me too!
Back to top
View user's profile Send private message
Rajapriyaa

New User


Joined: 12 May 2009
Posts: 2
Location: Chennai

PostPosted: Wed Jun 24, 2009 6:08 pm    Post subject: Reply to: Signed float variable representation
Reply with quote

Hi All,
Thanks for the details. It helped me a lot to resolve the problem in time. Since i was in hurry to get the answer for this que, i have posted. Hereafter i will make sure that to look into the manual first. Thanks a lot.
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 Writing on to GSAM variable length rohanthengal JCL & VSAM 6 Fri Mar 03, 2017 7:46 pm
No new posts Count Trailing Spaces in variable str... Virendra Shambharkar SYNCSORT 10 Thu Feb 02, 2017 12:23 pm
No new posts Format to pipe delimited with variabl... pshongal SYNCSORT 6 Wed Sep 14, 2016 2:48 pm
No new posts Variable for cursor names ravikumar15 DB2 5 Sun Jul 17, 2016 7:08 am
No new posts DB2 FLOAT precision soundarr DB2 4 Fri Jul 15, 2016 9:47 pm


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