On Wed, 24 Jul 2013 08:00:07 -0500, John McKown <john.archie.mck...@gmail.com> wrote:
>01 UNSIGNED-PACKED-TIMES-10. > 05 UNSIGNED-PACKED PIC X(2). > 05 FILLER PIC X VALUE IS X'0F'. There be dragons... >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. This will work only the first time round. Next time the upper nibble of the FILLER will contain a sign nibble and your value will be incorrect... You have to re-initialise the UNSIGNED-PACKED-TIMES-10 with an INITIALISE or give the FILLER a proper name and MOVE ZERO to it. Cheers, Jantje. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN