× 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 Decimal
  • From: "Stone, Brad V (TC)" <bvstone@xxxxxxxxxxxxxx>
  • Date: Thu, 17 Aug 2000 12:30:14 -0500

Try the #CtoN source at www.netshare400.com in the source samples section.
so far it's worked 100% for me.

Brad

> -----Original Message-----
> From: Colin Thorpe [mailto:Colin@IBS-PUBLIC-SERVICES.CO.UK]
> Sent: Thursday, August 17, 2000 10:11 AM
> To: RPG400-L@midrange.com
> Subject: Character to Decimal
> 
> 
> Hi all,
> 
> I am trying to take a character field (10A) containing something like
> 123.45bbbbb,
> And move it into a numeric field (12,2) 0000000123.45.
> 
> The character field may or may not contain a decimal point.
> Therefore its value could be from  .01 ==> 9999999999
> 
> Some time ago the C function ATOL was mentioned by Hans.
> 
> I'm using V3R7 and managed to get his example working fine.
> 
> Unfortunately this only returns the integer part of the value.
> 
> I also tried ATOF but I'm not sure what the resulting value 
> means.  2235.14
> = 1079246848 ?
> 
> I can solve this problem using data structures and selects 
> but I'm looking
> for an elegant ILE solution.
> 
> Any help will be greatly appreciated.
> 
> Thanks in advance
> 
> Colin     
> 
> +---
> | 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-Ups:

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.