Re: Unsigned packed decimal

2013-07-26 Thread Jantje.
Charles (Chuck) Hardee said: >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

Re: Unsigned packed decimal

2013-07-25 Thread Clark Morris
On 24 Jul 2013 02:20:25 -0700, in bit.listserv.ibm-main you wrote: >Hello. > > >I have a input file where the data is stored in unsigned packed decimal >format, now i need the data to be moved to 9(4) field. Could someone let me >know how the data is retrived? Is this

Re: Unsigned packed decimal

2013-07-25 Thread Hardee, Chuck
irect: 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, 2

Re: Unsigned packed decimal

2013-07-25 Thread Jantje.
On Wed, 24 Jul 2013 08:00:07 -0500, John McKown 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) USAG

Re: Unsigned packed decimal

2013-07-24 Thread Ron Thomas
Thanks a lot to everyone to make me understand this :) -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Unsigned packed decimal

2013-07-24 Thread John McKown
Yes, so long at the upper nybble of the UNSIGNED-PACKED is zero. I.e. your unsigned packed is in the range x'00' to x'09'. 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

Re: Unsigned packed decimal

2013-07-24 Thread John McKown
Great idea to avoid the division. Hopefully the COBOL compiler would be intelligent enough to do an SRP instead of a DP to get rid of the extra digit. On Wed, Jul 24, 2013 at 9:54 AM, Bernd Oppolzer wrote: > John, thanks for the COBOL code; my COBOL experience dates from > the 90s, so I'm not ver

Re: Unsigned packed decimal

2013-07-24 Thread Bernd Oppolzer
John, thanks for the COBOL code; my COBOL experience dates from the 90s, so I'm not very good in providing COBOL source examples. Yes, I think, this will be ok for 6 digit unsigned packed, giving a 7 digit signed result. Things can be made a little easier if you define the overlaying field (call

Re: Unsigned packed decimal

2013-07-24 Thread Ron Thomas
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) US

Re: Unsigned packed decimal

2013-07-24 Thread John McKown
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

Re: Unsigned packed decimal

2013-07-24 Thread Ron Thomas
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 lists...@listserv.ua.edu with the message: INFO

Re: Unsigned packed decimal

2013-07-24 Thread Ron Thomas
the code is in cobol -- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Re: Unsigned packed decimal

2013-07-24 Thread Bernd Oppolzer
have a input file where the data is stored in unsigned packed decimal format, now i need the data to be moved to 9(4) field. Could someone let me know how the data is retrived? Thanks, Ron T -- For IBM-MAIN subscribe / signoff

Re: Unsigned packed decimal

2013-07-24 Thread Hardee, Chuck
17-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 Ron Thomas Sent: Wednesday, July 24, 2013 5:20 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Unsigned packed decimal Hello. I have a input f

Unsigned packed decimal

2013-07-24 Thread Ron Thomas
Hello. I have a input file where the data is stored in unsigned packed decimal format, now i need the data to be moved to 9(4) field. Could someone let me know how the data is retrived? Thanks, Ron T -- For IBM-MAIN