Fixing some typos in my own response:
On 4/24/2013 9:34 AM, Steve Comstock wrote:
On 4/24/2013 9:19 AM, John Gilmore wrote:
My understanding of the difference between unsigned and signed packed
decimal values is that the rightmost sign nibble in a signed packed
value is occupied by a digit in an unsigned value.
Consider a four-byte value. The hardware interprets a signed value as
|d|d|d|d|d|d|d|s|, a precision of 7 decimal digits.
and an unsigned one as
|d|d|d|d|d|d|d|d|, a precision of 8 decimal digits.
No. The hardward does not recognize any such animal as an unsigned
packed decimal digit. All packed decimal data carries a sign in
the rightmost hex digit; x'A', x'C', x'E', and x'F' are considered
to be positive, x'B', x'D' are considered to be negative, x'0'=x'9'
are considered invalid and will abend you if you try to use such
data in any packed decimal operation.
should be:
No. The hardware does not recognize any such animal as an unsigned
packed decimal data item. All packed decimal data carries a sign in
the rightmost hex digit; x'A', x'C', x'E', and x'F' are considered
to be positive, x'B', x'D' are considered to be negative, x'0'-x'9'
are considered invalid and will abend you if you try to use such
data in any packed decimal operation.
They are thus easy to distinguish: the decimal digits are in the
sequence 0000, 0001, . . . 1001; and the signs are the [logically]
larger four-bit values.
Vide pp. 9-2ff of the PrOp.
I do not recommend mixing them.
The OP is not considering mixing them but is considering the
vagaries of converting between packed and character numeric strings.
John Gilmore, Ashland, MA 01721 - USA
--
Kind regards,
-Steve Comstock
The Trainer's Friend, Inc.
303-355-2752
http://www.trainersfriend.com
* To get a good Return on your Investment, first make an investment!
+ Training your people is an excellent investment
* Try our tool for calculating your Return On Investment
for training dollars at
http://www.trainersfriend.com/ROI/roi.html
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN