In <[email protected]>, on 04/25/2013
at 08:47 PM, "Joel C. Ewing" <[email protected]> said:
>An old, old historic convention with punch cards was to use an "11"
> punch above the rightmost digit on a card for negative numeric
>fields (which converts that column to represent EBCDIC X'D0' to
>X'D9) and no zone punch if positive, so PACK applied to bytes from
>such a field would get a consistent "F" sign for positive and "D"
>sign for negative and the result of the pack could be directly used
>as a Packed Decimal arithmetic operand. Going the other way, if you
>knew for certain that the packed number was positive and the sign
>nibble was "F", then UnPack gives the correct EBCDIC character
>for the rightmost digit without any clean up. Unfortunately
>results of packed decimal arithmetic use "C" for positive results,
>so if unsure how a field was produced, something like an OI of
>"F0" would be required on the rightmost byte for positive values
>to force a numeric character after an Unpack (or use some
>alternative unpack method like the Edit instruction). A minor
>simplification, granted, but being able to eliminate a few
>instructions is always aesthetically pleasing.
What are you eliminating? If some of your data were produced with AP,
then you need the code to deal with a C zone.
--
Shmuel (Seymour J.) Metz, SysProg and JOAT
Atid/2 <http://patriot.net/~shmuel>
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN