Re: Decimal Floating Point Numbers
Just to add my 2 cents to this discussion, DFP numbers retain zero digits to both the left and right of the radix point. This is different from both binary floating point and hexadecimal floating point where for normalised numbers, there is a single representation of a value (this has the advantage of increasing the precision of the fraction). DFP introduces the concept of 'cohort' - the set of different representations of the same value - and 'quantum' - the magnitude of the rightmost digit in the significand (fraction). Each member of a cohort will have a different quantum. As a result of cohorts, it is important that any comparison of DFP numbers use the compare DFP instructions - even zeroes may have differing quantums so a comparison of the binary representations would not give the correct result The Extract Biased component instruction allows you to determine the quantum of a value. While the Quantize instruction adjusts the quantum - this might be used where the value is say a balance in dollars and you just want to keep 2 digits to the right of the decimal point. Kind regards John Dravnieks
RES: HLASM PUNCH statement
I'll try it. Thanks -Mensagem original- De: IBM Mainframe Assembler List Em nome de Binyamin Dissen Enviada em: quinta-feira, 7 de março de 2024 05:02 Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU Assunto: Re: HLASM PUNCH statement How about post-processing the object deck, split out records that do not begin with x'02' and then merge them at the end? Probably can be done in a SORT step. On Wed, 6 Mar 2024 14:44:05 -0300 João Reginato wrote: :>Hi :> :> :> :>PUNCH ALIAS XYZ,ABC :> :> :> :>In the past I used the punch above with no problems at all. :> :>But now, using HLASM, the Binder says: :> :> :> :>IEW2556W 4604 RECORD NUMBER 22 OF THE CURRENT OBJECT MODULE HAS AN INVALID :>OBJECT IDENTIFIER IN COLUMN 1. :> :> :> :>How can I put the punch at the beginning or the end of the object module if :>it is generated in a macro call in the middle of the source? :> :>Is there a way or maybe another statement to do it? :> :> :> :>TIA :> :>João :> :> :> :> -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel
RES: HLASM PUNCH statement
Yes, the spaces are there, before PUNCH and before ALIAS as follows: " PUNCH ' ALIAS XYZ,ABC' " -Mensagem original- De: IBM Mainframe Assembler List Em nome de Bertus Bekker Enviada em: quinta-feira, 7 de março de 2024 05:37 Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU Assunto: Re: HLASM PUNCH statement Used to do this a lot, but always had a space in front of the linkage editor command. On Thu, Mar 7, 2024 at 10:01 AM Binyamin Dissen wrote: > How about post-processing the object deck, split out records that do not > begin > with x'02' and then merge them at the end? > > Probably can be done in a SORT step. > > On Wed, 6 Mar 2024 14:44:05 -0300 João Reginato > wrote: > > :>Hi > :> > :> > :> > :>PUNCH ‘ALIAS XYZ,ABC’ > :> > :> > :> > :>In the past I used the punch above with no problems at all. > :> > :>But now, using HLASM, the Binder says: > :> > :> > :> > :>IEW2556W 4604 RECORD NUMBER 22 OF THE CURRENT OBJECT MODULE HAS AN > INVALID > :>OBJECT IDENTIFIER IN COLUMN 1. > :> > :> > :> > :>How can I put the punch at the beginning or the end of the object module > if > :>it is generated in a macro call in the middle of the source? > :> > :>Is there a way or maybe another statement to do it? > :> > :> > :> > :>TIA > :> > :>João > :> > :> > :> > :> > > -- > Binyamin Dissen > http://www.dissensoftware.com > > Director, Dissen Software, Bar & Grill - Israel >
Re: Decimal Floating Point Numbers
Hi Michael, In Cobol it is no picture for comp-1 or comp-2 field. René Le mercredi 6 mars 2024 à 19:44:29 UTC+1, Schmitt, Michael a écrit : The decimal position in a COBOL field affects more than just the display*. It also affects rounding, truncation, scaling and alignment. For example: Field-1 pic 99v999 value 10.100 Field-2 pic 9v value 1.2345 Field-3 pic 999v99 Compute field-3 = field-1 + field-2 results in 11.33. Not 224.45. * and it would need to be an explicit decimal (i.e. edited) to affect the display, e.g. pic 999.99. /pedantic_mode -Original Message- From: IBM Mainframe Assembler List On Behalf Of Gary Weinhold Sent: Wednesday, March 6, 2024 12:03 PM To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Decimal Floating Point Numbers This reminds me in a way of number representation in COBOL. The PICTURE allows you to place the implicit decimal point anywhere, which will afftect the display of the number, but internally there is just a fullword, or packed decimal or halfward, etc. So the programmer choses whether to display, for example, $12345.67 (dollars and cents) or 1234567 pennies or 12.3 Thousands of dollars. Where do you get to indicate whether you want LUV or RUV? Is it part of the convert to zoned decimal or is it an convention that an application agrees on? I can see what it is but I can't see how I can request one or the other in assemlber language. Or is an HLL concept that some asembler subroutine implements for the HLL? Gary Weinhold Senior Application Architect DATAKINETICS | Data Performance & Optimization Phone:+1.613.523.5500 x216 Email: weinh...@dkl.com Visit us online at http://www.dkl.com/ E-mail Notification: The information contained in this email and any attachments is confidential and may be subject to copyright or other intellectual property protection. If you are not the intended recipient, you are not authorized to use or disclose this information, and we request that you notify us by reply mail or telephone and delete the original message from your mail system. From: IBM Mainframe Assembler List on behalf of Gary L Peskin Sent: March 6, 2024 11:30 To: ASSEMBLER-LIST@LISTSERV.UGA.EDU Subject: Re: Decimal Floating Point Numbers Thanks, Abe. I'm glad I was able to help. I don't really understand why they started with this whole LUV/RUV thing anyway. They could have just picked one and said that that's the representation and left it at that (no pun intended!). But I guess that wouldn't have been confusing enough. Take care, Gary
Re: HLASM PUNCH statement
Used to do this a lot, but always had a space in front of the linkage editor command. On Thu, Mar 7, 2024 at 10:01 AM Binyamin Dissen wrote: > How about post-processing the object deck, split out records that do not > begin > with x'02' and then merge them at the end? > > Probably can be done in a SORT step. > > On Wed, 6 Mar 2024 14:44:05 -0300 João Reginato > wrote: > > :>Hi > :> > :> > :> > :>PUNCH ‘ALIAS XYZ,ABC’ > :> > :> > :> > :>In the past I used the punch above with no problems at all. > :> > :>But now, using HLASM, the Binder says: > :> > :> > :> > :>IEW2556W 4604 RECORD NUMBER 22 OF THE CURRENT OBJECT MODULE HAS AN > INVALID > :>OBJECT IDENTIFIER IN COLUMN 1. > :> > :> > :> > :>How can I put the punch at the beginning or the end of the object module > if > :>it is generated in a macro call in the middle of the source? > :> > :>Is there a way or maybe another statement to do it? > :> > :> > :> > :>TIA > :> > :>João > :> > :> > :> > :> > > -- > Binyamin Dissen > http://www.dissensoftware.com > > Director, Dissen Software, Bar & Grill - Israel >
Re: HLASM PUNCH statement
How about post-processing the object deck, split out records that do not begin with x'02' and then merge them at the end? Probably can be done in a SORT step. On Wed, 6 Mar 2024 14:44:05 -0300 João Reginato wrote: :>Hi :> :> :> :>PUNCH ALIAS XYZ,ABC :> :> :> :>In the past I used the punch above with no problems at all. :> :>But now, using HLASM, the Binder says: :> :> :> :>IEW2556W 4604 RECORD NUMBER 22 OF THE CURRENT OBJECT MODULE HAS AN INVALID :>OBJECT IDENTIFIER IN COLUMN 1. :> :> :> :>How can I put the punch at the beginning or the end of the object module if :>it is generated in a macro call in the middle of the source? :> :>Is there a way or maybe another statement to do it? :> :> :> :>TIA :> :>João :> :> :> :> -- Binyamin Dissen http://www.dissensoftware.com Director, Dissen Software, Bar & Grill - Israel