I'm hardly an expert here
I'm not either, but we have a couple of them lurkikng about who are not shy. . .
but I see three issues with a packed decimal value in a key or index
binary 0s in high order digits.
If done (which i work dilligently to avoid) the lengths need to be the same.
Negative values won't sort properly.
They should sort correctly if defined as packed-decimal rather than some other data type (i.e. character, binary, etc).
Alternate sign representations.
On all of the systems i've worked with, packed-decimal data has a C, D, or F sign.
There are similar issues with binary data.
Yup, i agree. When binary data is to be a key, my PMs have insisted that the number not be signed (must always be positive). Prevents various "opportunities". . .