× 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: how to get the IP from an interactive session
  • From: "Billy Rowe" <billyrowe@xxxxxxx>
  • Date: Thu, 10 Aug 2000 17:15:29 -0700
  • Importance: Normal

> -----Original Message-----
> From: owner-midrange-l@midrange.com
> [mailto:owner-midrange-l@midrange.com]On Behalf Of Jodi Walker
> Sent: Wednesday, August 09, 2000 5:42 PM
> To: MIDRANGE-L@midrange.com
> Subject: how to get the IP from an interactive session




You can use the following CLP to retrieve the IP address of a device, you
could also write a command to front end this CLP but I didn't include it.

HTH


/* Retreive IP address of device running this pgm             */
RtvIPADRcl: PGM        PARM(&Devd &IpAddr)

dcl &devd      *char len(10)  /* Device where pgm is running       */
dcl &IpAddr    *char len(15)  /* IP Address of device running pgm  */
dcl &Receiver  *char len(892) /* Receiver for device information   */  *
dcl &Length    *char len(4)   /* Length of receiver in hex         */
dcl &ErrLength *char len(4)   /* Length of error struct in hex     */

Monmsg MsgId(CPF9999) EXEC(GOTO CMDLBL(STDERR)) /* Global error */


ChgVar Var(%BIN(&Length)) Value(892)   /* Init receiver length     */
ChgVar Var(%BIN(&ErrLength)) Value(0)  /* Init error struct length */

/* Retreive device information into receiver parameter             */
Call QDCRDEVD  Parm(&Receiver &Length DEVD0600 &Devd &ErrLength)

/* Extract IP Address out of device receiver parameter             */
ChgVar &IPAddr  Value(%SST(&Receiver 878 15))

Return

STDERR:                /* Standard error handling routine */

SNDNETMSG  MSG('### ERROR ERROR ### - The RTVIPADRCL +
                           pgm that retreives the IP Adress of a +      *
                           device ended abnormally for user from +
                           whom this message was sent, please check +
                           it out.') TOUSRID((x x))
DmpClPgm                                                               *
DspJob OutPut(*PRINT) Option(*ALL)

FwdPgmMsg      /* Forward pgm error messages           */
monmsg cpf0000
EndPgm

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

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.