Phil,

In the IBM z/Architecture Principles of Operation, publication number
SA22-7832-08, on page 8-2 it states that X'F' is an alternate encoding for a
positive sign.  However, in the programming note to figure 8-1 on page 8-3,
it suggests that X'F' be used in zoned decimal formats for the high-order
nibble of all bytes save the rightmost, which should be encoded using one of
the recognized sign encodings.  I would note that if the value is
nonnegative, an encoding of X'F' is preferable to X'C' in that in the zoned
decimal format, the resulting character string consists of all decimal
digits.

It is worth noting that the PACK machine instruction does NO validation of
the sign nibble in any byte of the field being packed.  The sign nibble of
the rightmost byte of the source (zoned) field is copied to the rightmost
nibble of the target (packed) field.

John P. Baker
NGSSA, LLC

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[email protected]] On
Behalf Of Phil Smith
Sent: Sunday, July 15, 2012 10:42 AM
To: [email protected]
Subject: Re: COBOL packed decimal

John P. Baker wrote:
>A positive value is identified by a sign encoded as --

>    X'A'
>    X'C' (Preferred)
>    X'E'
>    X'F'

>A negative value is identified by a sign encoded as --

>    X'B'
>    X'D' (Preferred)

>The preferred encoding are always generated by packed decimal 
>instructions,

>The alternative encoding are accepted as input to packed decimal 
>instructions.

I've read elsewhere that x'F' meant "unsigned". Not true?
--
...phsiii

Phil Smith III
[email protected]<mailto:[email protected]>
Voltage Security, Inc.
www.voltage.com<http://www.voltage.com/>
(703) 476-4511 (home office)
(703) 568-6662 (cell)


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [email protected] with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to