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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
15 matches
Mail list logo