× 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: A program to get the IP address of the Internet connection.
  • From: "Joe Teff" <jteff19@xxxxxxx>
  • Date: Tue, 23 Nov 1999 22:37:31 -0600

> Would anyone possibly be willing to share a program that could get the IP
> address the 400 is connected to the internet with?
> I am connecting to the ISP with dynamic IP addressing.  I'd like to bring
> the IP address into a program so I can use it to keep the 400 alive and so
> I can use it to know when I am connected.  I'm on V4R4.

            PGM
            DCL        VAR(&DEVD)       TYPE(*CHAR)  LEN(10)
            DCL        VAR(&IP)         TYPE(*CHAR)  LEN(15)
            DCL        VAR(&RECEIVER)   TYPE(*CHAR)  LEN(892)
            DCL        VAR(&LENGTH)     TYPE(*CHAR)  LEN(4)
            DCL        VAR(&ERRLENGTH)  TYPE(*CHAR)  LEN(4)
            RTVJOBA    JOB(&DEVD)
            CHGVAR     VAR(%BIN(&LENGTH))     VALUE(892)
            CHGVAR     VAR(%BIN(&ERRLENGTH))  VALUE(0)
            CALL       PGM(QDCRDEVD) PARM(&RECEIVER &LENGTH +
                         DEVD0600 &DEVD &ERRLENGTH)
            CHGVAR     VAR(&IP) VALUE(%SST(&RECEIVER 878 15))
            ENDPGM

I can't take credit for this code as I got it from this list on an earlier
date.

Joe Teff

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

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.