View previous topic :: View next topic
|
Author |
Message |
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
I need to know how to identify zoned decimal?
Would appreciate if i can get a piece of code.
Thanks. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Zoned Decimal (a/k/a Display Numeric) can be either signed or unsigned. Example -
Code: |
03 WS-ZONED-SIGNED PIC S9(10) VALUE +0123456789.
03 WS-ZONED-UNSIGNED PIC 9(10) VALUE 0123456789.
|
When signed, the last byte (in this example, a 9) is a value of X'C9' (the 'C' zone nibble is the overpunch character). If it were a negative value, then it would equal X'D9'.
When unsigned (again, a 9) the value is X'F9' (no overpunch).
In both value clauses above, 012345678 are the same, with each byte having an 'F' zone nibble.
Bill |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Quote: |
I need to know how to identify zoned decimal? |
Where? In code or in some data? |
|
Back to top |
|
|
enrico-sorichetti
Superior Member
Joined: 14 Mar 2007 Posts: 10873 Location: italy
|
|
|
|
the principle of operations manual will tell the all You need to know about the numeric data representations.
searching for it by Yourself will deepen Your knowledge on the ways of finding faster the info You need |
|
Back to top |
|
|
|