|
Flagler,
I cut and slightly modified this from the CODE/400 downloads page.
PGM (&SERVER &PORT &PARMS)
DCL VAR(&SERVER) TYPE(*CHAR) LEN(8)
DCL VAR(&PORT) TYPE(*CHAR) LEN(5)
DCL VAR(&PARMS) TYPE(*CHAR) LEN(32)
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 SERVER(&SERVER) RMTLOCNAME(&IP) +
CMNTYPE(*TCPIP) PARMS(&PARMS) PORT(&PORT)
ENDPGM: ENDPGM
/* CRTCMD CMD(*LIBL/STRCODETCP) +
PGM(*LIBL/STRCODETCP) +
SRCFILE(*LIBL/QCMDSRC) +
SRCMBR(STRCODETCP) +
TEXT('Start Code TCP version.') +
MODE(*ALL) +
ALLOW(*ALL) +
MAXPOS(*NOMAX) +
HLPSCHIDX(*NONE) +
HLPPNLGRP(QCODE/QHQDCMD) +
HLPID(STRCODE) */
CMD PROMPT('START CODE')
PARM KWD(SERVER) +
TYPE(*CHAR) +
LEN(8) +
DFT(OS400) +
ALWUNPRT(*NO) +
PROMPT('HOST SERVER NAME' 1)
PARM KWD(PORT) +
TYPE(*CHAR) +
LEN(5) +
DFT(*PRV) +
RANGE( +
'1' +
'65534') +
SPCVAL( +
(*PRV ) +
(*DFT )) +
PMTCTL(*PMTRQS) +
PROMPT('TCP/IP PORT NUMBER' 3)
PARM KWD(PARMS) +
TYPE(*CHAR) +
LEN(32) +
DFT(*NONE) +
SPCVAL( +
(*NONE )) +
PROMPT('ADDITIONAL PARAMETERS' 2)
David Morris
>>> flagler@timken.com 01/10/00 05:10PM >>>
FROM: FLAGLER KEENE Flagler, Rick: Manager,
IT
DATE: JANUARY 10, 2000
SUBJECT: Code/400 access to AS/400 via ISPs (getting tcp/ip
addr)
Does anyone know of an AS/400 command or API which enables you to
retrieve your own current TCP/IP address when connected to the AS/400 via
an ISP? When I dial into the ISP, an address is assigned automatically
and therefore it will be different each time I connect. When I run
CODE/400s STRCODE command, I need this IP address in order to get the
host server started. As a user with authority to configure TCP/IP, I know
a way to locate the address using NETSTAT (depending upon how many other
users are also on) but I would like to write a command/program to STRCODE
from a menu and hide the complexity from the typical, lesser authority,
users. Can this be down? Any tips would be appreciated. Thanks. RF
+---
| This is the CODE/400 Mailing List!
| To submit a new message, send your mail to CODE400-L@midrange.com.
| To subscribe to this list send email to CODE400-L-SUB@midrange.com.
| To unsubscribe from this list send email to CODE400-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: larry@paque.net
+---
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.