|
SatyaNarayana,
I downloaded the following program from IBM's CODE/400
web site. You should be able to extract what you need.
PGM
DCL VAR(&BIN4) TYPE(*CHAR) LEN(4)
DCL VAR(&RCV) TYPE(*CHAR) LEN(893)
DCL VAR(&RCVLEN) TYPE(*CHAR) LEN(4)
DCL VAR(&RCVLEND) TYPE(*DEC) LEN(9)
DCL VAR(&ERR) TYPE(*CHAR) LEN(100)
DCL VAR(&DEC8) TYPE(*DEC) LEN(8 0)
DCL VAR(&FRMCFG) TYPE(*CHAR) LEN(8) VALUE('CFGD0200')
DCL VAR(&DEVD) TYPE(*CHAR) LEN(10)
DCL VAR(&FRMDEV) TYPE(*CHAR) LEN(8) VALUE('DEVD0600')
DCL VAR(&IP) TYPE(*CHAR) LEN(15)
DCL VAR(&PASTHR) TYPE(*CHAR) LEN(1)
CHGVAR VAR(&RCVLEND) VALUE(893)
CHGVAR VAR(%BIN(&RCVLEN)) VALUE(&RCVLEND)
RTVJOBA JOB(&DEVD)
CHGVAR VAR(%BINARY(&BIN4)) VALUE(&DEC8)
CALL PGM(QDCRDEVD) PARM(&RCV &RCVLEN &FRMDEV +
&DEVD &ERR)
CHGVAR VAR(&PASTHR) VALUE(%SST(&RCV 831 1))
CHGVAR VAR(&IP) VALUE(%SST(&RCV 878 15))
STRCODE RMTLOCNAME(&IP) CMNTYPE(*TCPIP)
ENDPGM: ENDPGM
David Morris
>>> "SatyaNarayana A.N.V" <satya400@yahoo.com> 04/13/99 10:00PM >>>
Hi everyone! How can I retrieve the IP address and Port number of my
session ?
I tried WRKTCPSTS OPTION(*CNN). But the output lists all the IP
addresses of all those clients who are connected to AS/400. But my need
is to extract programatically (in CL) the current IP address and Port
Number. I need this information for JAVA Remote AWT Programs.
Any directions Please?
Thanks In Advance
ANV SatyaNarayana
satya400@yahoo.com
+---
| 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 mailing list archive is Copyright 1997-2025 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.