Huh????? How do you arrive at that conclusion? The example code moves data to the 2 bytes within the group called UNSIGNED-PAKED-TIME-10 but never moves anything to the byte defined as FILLER. The DIVIDE uses all 3 bytes as the numerator but the quotient is a completely separate field so nothing is overlaid by it.
Which instruction are you thinking destroys the upper nibble of the FILLER byte? I just don't see it. C- Charles (Chuck) Hardee Senior Systems Engineer/Database Administration CCG Information Technology Thermo Fisher Scientific 300 Industry Drive Pittsburgh, PA 15275 Direct: 724-517-2633 FAX: 412-490-9230 chuck.har...@thermofisher.com -----Original Message----- From: IBM Mainframe Discussion List [mailto:IBM-MAIN@LISTSERV.UA.EDU] On Behalf Of Jantje. Sent: Thursday, July 25, 2013 6:48 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Unsigned packed decimal 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 ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN