View previous topic :: View next topic
|
Author |
Message |
Rajapriyaa
New User
Joined: 12 May 2009 Posts: 2 Location: Chennai
|
|
|
|
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 |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
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 |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Dick,
Hex representation would have made the OP think a little more.
Regards, |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
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! |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Quote: |
Hex representation would have made the OP think a little more |
me too! |
|
Back to top |
|
|
Rajapriyaa
New User
Joined: 12 May 2009 Posts: 2 Location: Chennai
|
|
|
|
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 |
|
|
|