You are here:
DBG/400
>
DBG400 Web
>
SourceCodeList
>
ClSource
>
ClRTNIPADDR
(24 Jun 2005,
MartinRowe
)
(raw view)
E
dit
A
ttach
<verbatim> /******************************************************************************/ /* Copyright (c) Tom Liotta http://zap.to/tl400 Used with permission */ /******************************************************************************/ RTNIPADDR: PGM PARM(&RTVDEV &TCPADDR) /* Device to retrieve */ DCL VAR(&RTVDEV) TYPE(*CHAR) LEN(10) /* TCP/IP address */ DCL VAR(&TCPADDR) TYPE(*CHAR) LEN(15) /* Device name */ DCL VAR(&DEVNAM) TYPE(*CHAR) LEN(10) /* Error field */ DCL VAR(&ERROR) TYPE(*CHAR) LEN(4) + VALUE(X'00000000') /* Network protocol */ /* Set to TCP/IP */ DCL VAR(&PROTOCOL) TYPE(*CHAR) LEN(1) VALUE(X'02') /* Receiver variable */ DCL VAR(&RCVVAR) TYPE(*CHAR) LEN(1024) MONMSG MSGID(CPF0000 MCH0000) EXEC(GOTO + CMDLBL(STDERR)) IF COND(&RTVDEV *EQ '*') THEN(RTVJOBA + JOB(&RTVDEV)) /* Call the Retrieve Device Description API, Format DEVD0600 */ /* to retrieve information about selected device */ CHGVAR VAR(&RCVVAR) VALUE(' ') CHGVAR VAR(&TCPADDR) VALUE(*BLANKS) CALL PGM(QDCRDEVD) PARM(&RCVVAR X'00000400' + 'DEVD0600' &RTVDEV &ERROR) /* Extract values from receiver variable if retrieved device */ /* is a TCP/IP device (position 859, network protocol = X'02') */ CHGVAR VAR(&DEVNAM) VALUE(%SST(&RCVVAR 22 10)) IF COND(&DEVNAM *NE ' ') THEN(DO) IF COND(%SST(&RCVVAR 859 1) *EQ &PROTOCOL) + THEN(DO) CHGVAR VAR(&TCPADDR) VALUE(%SST(&RCVVAR 878 15)) ENDDO ENDDO RETURN STDERR: MOVDIAGMSG MONMSG MSGID(CPF0000 MCH0000) RSNESCMSG MONMSG MSGID(CPF0000 MCH0000) RETURN ENDPGM </verbatim> -- Main.MartinRowe - 24 Jun 2005
E
dit
|
A
ttach
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
Edit
w
iki text
|
M
ore topic actions
Topic revision: r1 - 24 Jun 2005 - 05:32:58 -
MartinRowe
DBG400
Log In
DBG400 Web
Index
Search
Changes
Notifications
Statistics
Site Map
Downloads
Webs
DBG400
Jamaro
Main
Sandbox
Sandtub
System
Send a link to this page
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DBG/400?
Send feedback