A 1 byte packed decimal can only represent 1 digit numbers since one nibble is always used to represent the sign.
Therefore decimal 18 cannot be represented in a 1 byte packed decimal.
You would need 2 bytes.
eg. x'018C' would represent +18 and x'018F' unsigned 18 etc.
EddieA is right x'63' is not a valid packed decimal value.
Hence your error.
Packed Decimal is equivilent to COBOL COMP-3.
Please explain the encoding of your decimal.
It is not packed decimal.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum