× 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.



Bruce,

Wow - thanks.  It probably is a typo on my part.

Now that we know the COBOL is getting the correct result in a different
form, can you suggest an algorithm for putting it in the correct form?

Much appreciate -- Jay

----- Original Message -----
From: "Bruce Vining" <bvining@us.ibm.com>
To: <cobol400-l@midrange.com>
Sent: Friday, May 24, 2002 11:24 AM
Subject: Re: IP Address Conversion using an IBM API


>
> Jay,
>
> I am not able to reproduce your exact values.  You mention that in RPG you
> get 3326352740 which would map to 198.68.29.100.  When I try your COBOL
> program using 198.68.29.100 I get -968614556 (which is close to your
> reported -989614556, but not quite the same).
>
> Now -968614556 is x'C6441D64', which when used as an unsigned integer is
> 3326352740 so you are getting the same returned data.  It's just being
> treated as signed in COBOL and unsigned in RPG.  So assuming one of the
> values in your note was a typo, you are getting the same results.
>
> Bruce





As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.