|
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I am trying to use IBM's API, "inet_addr" to convert an IP address. The code I'm using is, 0161.00 CALL PROCEDURE "inet_addr" 0162.00 USING 0163.00 by value address of PmIpAddr 0164.00 GIVING 0165.00 ApiReturn 0166.00 END-CALL. ApiReturn is pic s9(9) binary. We know that the IP Address is valid. The call populates the variable by -989614556. This is an error. The answer we're supposed to be getting is 3326352740. An RPG test program gives us that. In RPG, we define the ApiReturn value as "10U 0" (unsigned binary - no decimal places). I tried changing ApiReturn to pic 9(9) binary. It still ends up with -989614556. (1) Does anyone have actual experience doing this? If so, do I need to be doing something different or in addition to what I'm already doing? (2) If my pic clause is not correct, what is the correct pic clause for "unsigned binary"? (3) Any other suggestions? TIA Jay Sulzmann Senior Programmer/Analyst IBM Certified AS/400 RPG-IV Developer Hainey Business Systems 8 E. Canal St Dover, PA 17315 Phone: (800) 932-3380 x231 Fax: (717) 292-9474 Web: http://www.hbs-inc.com ________________________________ Providing E-Commerce, EDI, AS/400 Development and related services nationwide. ================================ --
As an Amazon Associate we earn from qualifying purchases.
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.