That's the problem. There is no natural COBOL data type for zArchitecture "unsigned-packed-decimal". COBOL's PACKED-DECIMAL data type (a.k.a. COMP-3) maps to zArchitecture "signed-packed-decimal", even in the case where no COBOL sign is specified.
Frank >________________________________ > From: Ulrich Krueger <[email protected]> >To: [email protected] >Sent: Thursday, April 25, 2013 5:26 PM >Subject: Re: Packed decimal and sign nibble > > >Actually, Frank, don't go overboard on this. >If I remember my (very antique) COBOL correctly, converting from one numeric >format to another is just a matter of properly specifying the desired PIC >clause and format, then a simple MOVE FldA to VISAFldA will do the >conversion for you. Let the compiler worry about generating the proper code. >That's what it's there for. If it doesn't work, blame the compiler (or the >programmer). If _your_ subroutine doesn't work, you'll get the O-dark-thirty >calls. > > >Regards, >Ulrich Krueger > > >-----Original Message----- >From: IBM Mainframe Discussion List [mailto:[email protected]] On >Behalf Of Frank Swarbrick >Sent: Thursday, April 25, 2013 3:58 PM >To: [email protected] >Subject: Re: Packed decimal and sign nibble > >Thanks! > > > > >>________________________________ >> From: Steve Comstock <[email protected]> >>To: [email protected] >>Sent: Thursday, April 25, 2013 4:18 PM >>Subject: Re: Packed decimal and sign nibble >> >> >>On 4/25/2013 4:13 PM, Frank Swarbrick wrote: >>> That's useful to know. We communicate with Visa and they use this format >for >>many of the fields in their messages. Currently we use some overly clever >COBOL >>to convert these to DISPLAY (zoned decimal) format. When I have time I'll >see if >>I can write a little asm routine to use CDUTR andCSDTR for this. I guess I >would >>have to follow a CDUTR with a CSDTR to convert it to signed-packed, and >then use >>UNPK (if desired) to get it to zoned decimal. Interesting. >> >>Hmm. Maybe ED instead of UNPK, I think. >> >> >>> >>> >>> >>> >>> >>>> ________________________________ >>>> From: Tom Marchant <[email protected]> >>>> To: [email protected] >>>> Sent: Thursday, April 25, 2013 8:01 AM >>>> Subject: Re: Packed decimal and sign nibble >>>> >>>> >>>> On Wed, 24 Apr 2013 10:38:06 -0600, Steve Comstock wrote: >>>> >>>>> So-called "unsigned packed-decimal" data is mis-leading >>>>> at best because it cannot be used in any packed decimal >>>>> arithmetic or compare operations.... >>>> >>>> Unsigned-Packed-Decimal was introduced in the sixth edition of >>>> the z/Architecture Principles of Operation, SA22-7832-05, along >>>> with the Decimal-floating-point facility. The publication date is >>>> April, 2007 >>>> >>>> -- >>>> Tom Marchant >>>> >>>> ---------------------------------------------------------------------- >>>> For IBM-MAIN subscribe / signoff / archive access instructions, >>>> send email to [email protected] with the message: INFO IBM-MAIN >>>> >>>> >>> >>> ---------------------------------------------------------------------- >>> For IBM-MAIN subscribe / signoff / archive access instructions, >>> send email to [email protected] with the message: INFO IBM-MAIN >>> >> >> >>-- >> >>Kind regards, >> >>-Steve Comstock >>The Trainer's Friend, Inc. >> >>303-355-2752 >>http://www.trainersfriend.com >> >>* To get a good Return on your Investment, first make an investment! >> + Training your people is an excellent investment >> >>* Try our tool for calculating your Return On Investment >> for training dollars at >> http://www.trainersfriend.com/ROI/roi.html >> >>---------------------------------------------------------------------- >>For IBM-MAIN subscribe / signoff / archive access instructions, >>send email to [email protected] with the message: INFO IBM-MAIN >> >> >> > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN > >---------------------------------------------------------------------- >For IBM-MAIN subscribe / signoff / archive access instructions, >send email to [email protected] with the message: INFO IBM-MAIN > > ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
