Glenn's solution will work on IBM mainframe compilers and many (most?) other compilers with COMP-3 as Packed-Decimal support. HOWEVER, it will *not* work on all non-IBM compilers. Some vendors do *NOT* allocate a "sign-nibble" for unsigned COMP-3 fields, i.e. for
PIC 9(5) Comp-3
the last byte includes the last *2* digits (with no sign to indicate it is "unsigned".
Personally, I prefer the "MOVE to 1 display numeric digit" solution as it will ALWAYS work. (Truncation is "guaranteed")
Bill Klein