• Subject: RE: Retrieve IP Address using Telnet exit point
  • From: Buck Calabro <mcalabro@xxxxxxxxxxxx>
  • Date: Mon, 19 Jul 1999 16:07:53 -0400

Dennis,
This is an elegant solution!  I love it!!  Just one nit.

Someone on the list pointed out to me a flaw in similar code that I had.
RPG/400's binary data type can't hold the full number: x'FFFFFFFF' =
4,294,967,295, which won't fit in a BIN4 field, because BIN4 truncates at
999,999,999 (nine digits).  If the data structure were implemented in RPGIV,
it would not encounter this restriction.

D                 DS                                    
D HexCod                  1      4                      
D Binary                        10u 0  overlay(HexCod:1)

Buck Calabro
Billing Concepts Albany, NY
mailto:mcalabro@commsoft.net

> -----Original Message-----
> From: Dennis Lovelady 
> Sent: Saturday, July 17, 1999 10:53 AM
> To:   MIDRANGE-L@midrange.com
> Subject:      Re: Retrieve IP Address using Telnet exit point
> 
> RPG code  (I-specs not aligned)
>    I         DS
>    I                1   4 HEXCOD
>    I                1   40BINARY
> 
>    C                     MOVE CODE      HEXCOD
>    C                     DIV  256       BINARY
>    C                     MVR            DIGIT4  30
>    C                     DIV  256       BINARY
>    C                     MVR            DIGIT3  30
>    C           BINARY    DIV 256        DIGIT1  30
>    C                     MVR            DIGIT2  30
> 
> (where CODE is your 4-byte hex code from the API.)
> 
> 
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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-2019 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 here. If you have questions about this, please contact [javascript protected email address].