× 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: String to Numeric
  • From: Jim Langston <jlangston@xxxxxxxxxxxxxxxx>
  • Date: Mon, 07 Feb 2000 11:42:51 -0800
  • Organization: Conex Global Logistics Services, Inc.

Thanks, Hans.  This is about the same information that
someone else gave me, though he showed me the atof function,
which in this specific case works better, although I have to also
use %Dec on it to convert it from float to integer.  My invoice
numbers can, and will, be up to 11 digits long, and it seems there
is a limit of 10 digits in atol.

Out of curiosity I tried changing it to 11 on the prototype, but no
dice, as I'm sure you're aware.  So to see what would happen I
changed it back to 10 and passed it '12345678901' and it came
back with some screwy number (2147483647) which is overflow
I guess.

The only modification I had to make was I could not use the header
switches of dftactgrp and bnddir (didn't exist in V3R7) and right now
I am compiling by selecting 14 with PDM and prompting with <F4>
and entering those values.

Okay, do you have a URL for a page on the internet that has the C
function library calls?  Or even the header file on the web (I understand
that no one could send me one as that would be an infringement of
copyright, but I can't use 'em if I don't know what they are).

Thanks again.

Regards,

Jim Langston

boldt@ca.ibm.com wrote:

> Every ILE RPG IV programmer has at their disposal every function
> in the C runtime library, including such useful functions as
> atol.
>
> Try compiling and running the following program:
> <SNIP>
> (It compiles on V4R4, but with a few obvious modifications
> should also run on V3R7.)
> <SNIP>

+---
| 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:
Replies:

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.