At 14:49 -0400 on 07/15/2012, John P. Baker wrote about Re: COBOL packed decimal:

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.

Note that the UNPK will place X'F' as the high nibble of all the positions except the low order one (where the sign is the sign nibble of the source).

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 also displays correctly as opposed to the low byte being A-J or {. This is also why the names of Type 3/4 SVCs end in these letters since they are signed decimal (using a X'Cx' sign).

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to