|
You can use the QDCRDEVD API to get it. Here's some code I got from somewhere that will do it for you. /*==================================================================*/ /* To compile: */ /* */ /* CRTCLPGM PGM(XXX/GETIPC) SRCFILE(XXX/QCLSRC) */ /* */ /*==================================================================*/ PGM PARM(&IPADDRESS) DCL VAR(&DEVICENAME) TYPE(*CHAR) LEN(10) DCL VAR(&IPADDRESS) TYPE(*CHAR) LEN(15) DCL VAR(&RECEIVER) TYPE(*CHAR) LEN(892) DCL VAR(&RCVRLENGTH) TYPE(*CHAR) LEN(4) DCL VAR(&FORMATNAME) TYPE(*CHAR) LEN(8) + VALUE('DEVD0600') DCL VAR(&ERRORCODE) TYPE(*CHAR) LEN(4) + VALUE(X'00000000') /* CHANGE VALUE OF &RCVRLENGTH TO BINARY VALUE */ CHGVAR VAR(%BIN(&RCVRLENGTH)) VALUE(892) ...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6 ...+... 7 ...+. /* RETRIEVE NAME OF AS/400 DEVICE THIS JOB IS RUNNING ON */ RTVJOBA JOB(&DEVICENAME) /* RETRIEVE IP ADDRESS OF CLIENT PC TO SEND SAVE FILE TO */ CALL PGM(QDCRDEVD) PARM(&RECEIVER &RCVRLENGTH + &FORMATNAME &DEVICENAME &ERRORCODE) CHGVAR VAR(&IPADDRESS) VALUE(%SST(&RECEIVER 878 15)) ENDPGM: ENDPGM ****************** End of data ********************************************* ----- Original Message ----- From: "Chris Beck" <CBeck@good-sam.com> To: <midrange-l@midrange.com> Sent: Tuesday, September 25, 2001 1:34 PM Subject: IP of device that is at a signon screen. > If I have a device with a Telnet session sitting on the sign on screen. I would then like to find out what the IP address of this device is, and the only thing I know is the device name. > > > > Any suggestions? > > > _______________________________________________ > This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list > To post a message email: MIDRANGE-L@midrange.com > To subscribe, unsubscribe, or change list options, > visit: http://lists.midrange.com/cgi-bin/listinfo/midrange-l > or email: MIDRANGE-L-request@midrange.com > Before posting, please take a moment to review the archives > at http://archive.midrange.com/midrange-l. >
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.