Thanks to all for the replies. Some comments/followup questions. First, just to 
be clear: I'm talking about packed decimal with a sign nibble, as the Subject: 
line says, not the perversion that's just a bunch o' nibbles with no sign.

Steve Comstock wrote:
> Note that character decimal can also be positive or unsigned.
>PACK and UNPK preserve the sign settings in both directions

True-and not being rude (at least, not trying to), but: I don't see how this 
relates to my question. Or are you suggesting that the character versions could 
use a + sign in front to indicate that it's signed? Given that this is actually 
encryption, and a positive value might encrypt to a negative one, that turns 
out not to work, since +1 could encrypt to -1 and then when we decrypt that, we 
won't know whether the 1 should be signed or not.

Elardus Engelbrecht wrote:
>Of course, it is normal.
>For example, this COBOL statement checks the data (From COBOL manual):
>    If Count-x is numeric then display "Data is good"
>Look for NUMPROC compiler option and NUMCLS option for COBOL for example.
>Try to do a COMPUTE with a character for a nice S0Cx abend. ;-D
That isn't what I asked, or at least not what I meant to ask: I'm asking about 
AFTER it's back in packed form, whether most things will care if the sign 
nibble has changed from unsigned to signed positive.

And:
> Yes, you will get problems, especially if you intend to do comparisions + 
> calculations where signs are important.
Other than CLC (which I would argue isn't how you should be comparing packed 
values), how does it matter? X + (unsigned 5) == X + (+5), no? (Yes, I see your 
example...that's, well, just plain strange!)

Anyway, I'm left with what feels like a "Maybe". Which isn't what I'd hoped, 
but is what I feared.

Thanks again,
--
...phsiii

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

Reply via email to