Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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: 6968
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: 2504
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: 8165
Location: East Dubuque, Illinois, USA

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: 6968
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 Moving values to a variable of copybo... Vignesh Sid COBOL Programming 6 Wed Sep 06, 2017 1:04 pm
No new posts Updating the Trailer count in variabl... satheshbabur DFSORT/ICETOOL 6 Wed Aug 30, 2017 9:49 pm
No new posts Move from Comp3 variable to Edited Va... sreekusr COBOL Programming 8 Thu Aug 10, 2017 4:20 pm
No new posts Can I traverse a STEM variable? chong.zhou CLIST & REXX 5 Wed May 31, 2017 3:54 pm
No new posts Converting Variable block file to Fix... bhavana yalavarthi DFSORT/ICETOOL 10 Tue May 16, 2017 2:20 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us