Yes, so long at the upper nybble of the UNSIGNED-PACKED is zero. I.e. your
unsigned packed is in the range x'000000' to x'099999'. If the first digit
is not 0, then you will end up with the wrong value. Which is what I guess
the "9(05)" is indicating. As Bernd indicated, it might be more efficient
to say:

01 NORMAL-PACKED REDEFINES UNSIGNEG-PACKED-TIMES-10 PIC S9(6)V9
PACKED-DECIMAL.

...

MOVE NORMAL-PACKED TO NORMAL-UNPACKED.

The MOVE from a S9(6)V9 PACKED-DECIMAL to a S9(5) DISPLAY will simply drop
the ending digit, effectively doing what the divide by 10 did in the
original.

On Wed, Jul 24, 2013 at 9:21 AM, Ron Thomas <[email protected]> wrote:

> Thank John for the explantion. so if suppose  it is 9(05) then is the
> below correct?
>
> 01 UNSIGNED-PACKED-TIMES-10.
>       05  UNSIGNED-PACKED PIC X(3).
>       05  FILLER PIC X VALUE IS X'0F'.
> 01 NORMAL-PACKED REDEFINES UNSIGNED-PACKED-TIMES-10 PIC S9(7)
> PACKED-DECIMAL.
> 01 NORMAL-UNPACKED PIC 9(5) USAGE DISPLAY.
>
>
> Thanks,
> Ron T
>
>
>
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>



-- 
This is a test of the Emergency Broadcast System. If this had been an
actual emergency, do you really think we'd stick around to tell you?

Maranatha! <><
John McKown

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

Reply via email to