× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.


  • Subject: RE: Character to Numeric
  • From: "Stone, Brad V (TC)" <bvstone@xxxxxxxxxxxxxx>
  • Date: Fri, 1 Dec 2000 11:32:08 -0600

Thank you so much for this Barabara.  

As for the URL to the code, I know it was in the HTTP Programmers Guide.
Somewhere where it tells you to convert the CONTENT_LENGTH from char to
numeric, it points or shows this routine similar to mine.  Don't know the
exact URL.  

Brad

> -----Original Message-----
> From: bmorris@ca.ibm.com [mailto:bmorris@ca.ibm.com]
> Sent: Friday, December 01, 2000 11:04 AM
> To: RPG400-L@midrange.com
> Subject: RE: Character to Numeric
> 
> 
> 
> >Date: Fri, 1 Dec 2000 07:57:32 -0600
> >From: "Stone, Brad V (TC)" <bvstone@taylorcorp.com>
> >Subject: RE: Character to Numeric
> >
> >So I just added a half adjust and so far it's worked flawlessly for 3
> >years or more.
> 
> Brad, as you know, using floating point will invalidate any 
> result with
> over 16 significant digits.  It might also fail for some values with
> fewer than 16 significant digits.  Are you sure it's worked 
> flawlessly?
> Would you know if the occasional result was out by 1 in the least
> significant place?
> 
> Anyway, if you or anyone else who is using your routine want it to
> work for all input within the packed(30,9) range, make these 
> 2 changes.
> (Hans and I were talking and he showed me this fix.)
> 
> 1. Use the (r) extender to keep all decimal places in the result
> 2. Use %inth on the 10** expression.
> 
> C                   eval(hr)  Num = (WrkNum * Sign /
> C                                       %inth(10**Decpos))
> 
> > as soon as IBM fixes the one that I copied this from.  Better get
> > crackin.
> 
> I'm not sure what the connection is, but we'll see what we can do to
> get that C2N snippet fixed.  I'm not sure we're talking about the
> same IBM routine though.  The C2N I know has at least 2 bugs; the (H)
> one and also a problem with negative numbers.  Can you please post the
> URL to the one you're referring to.
> 
> Barbara
> 
> 
> +---
> | This is the RPG/400 Mailing List!
> | To submit a new message, send your mail to RPG400-L@midrange.com.
> | To subscribe to this list send email to RPG400-L-SUB@midrange.com.
> | To unsubscribe from this list send email to 
> RPG400-L-UNSUB@midrange.com.
> | Questions should be directed to the list owner/operator: 
> david@midrange.com
> +---
> 
+---
| This is the RPG/400 Mailing List!
| To submit a new message, send your mail to RPG400-L@midrange.com.
| To subscribe to this list send email to RPG400-L-SUB@midrange.com.
| To unsubscribe from this list send email to RPG400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.