01 UNSIGNED-PACKED-TIMES-10.
      05  UNSIGNED-PACKED PIC X(2).
      05  FILLER PIC X VALUE IS X'0F'.
01 NORMAL-PACKED REDEFINES UNSIGNED-PACKED-TIMES-10 PIC S9(5)
PACKED-DECIMAL.
01 NORMAL-UNPACKED PIC 9(4) USAGE DISPLAY.


MOVE name-of-unsigned-packed-field TO UNSIGNED-PACKED OF
UNSIGNED-PACKED-TIMES-10.
DIVIDE NORMAL-PACKED BY 10 GIVING NORMAL-UNPACKED.

In the above, I assumed that the "unsigned packed" field is 2 bytes or 4
decimal digits. The smallest packed field is 3 bytes or 5 decimal digits
with a sign. The move places the 4 decimal digits in front of a packed zero
with a sign. This implicitly multiplies it by 10. So you divide by 10 and
use the GIVING phrase to get rid of the trailing zero, retaining a valid
sign.

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

> I am a bit confused, can you put the same in a cobol code so that i can
> have a look ?
>
> 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