I just noticed in someone eles's post...Rob Deko's maybe?...that what you really wanted was the IP address of the AS/400. The technique I show is for retrieving a workstation IP address. The way I retrieve the IP address of our AS/400 to build an auto-ftp script that I push to a pc for later ftp'ing back to our as/400....reads the file QUSRSYS/QATOCIFC. When I read the file, I look in a field named "LineType" for a value of "*ELAN" or "*TRLAN". The IP Address is stored in a field named "Internet". You could declare this file in your CL -> DCLF FILE(QUSRSYS/QATOCIFC) Receive it: LOOP: RCVF /* monitor for eof */ monmsg msgid(cpf0864) exec(GOTO CMDLBL(ENDPGM) IF COND(&LINETYPE *EQ '*ELAN' *OR &LINETYPE *EQ '*TRLAN) THEN(DO) CHGVAR VAR(&MYIP) VALUE(&INTERNET) do something else here.... ENDDO GOTO LOOP ENDPGM: ENDPGM ----- Original Message ----- From: "Shannon O'Donnell" <email@example.com> To: <firstname.lastname@example.org> Sent: Thursday, January 17, 2002 7:09 AM Subject: Re: Retrieve IP adress > Funny you should ask this today, of all days. We have a new newsletter, > Midrange Programmer - OS/400 Edition, that just came out last night. And > there is an article in this issue about retrieving a PC's IP address. This > one does it with RPGIV, but you can easily modify this to work in a CL > program. Or if you want, I can send you a CL program that does it too. > > Here's the link to Midrange Programmer - OS/400 Edition > http://www.midrangeserver.com/mpo/mpo011702-story02.html > > > ----- Original Message ----- > From: "Eric PANISSARD" <email@example.com> > To: "Mailing List AS400 (E-mail)" <MIDRANGE-L@midrange.com> > Sent: Wednesday, January 16, 2002 9:46 PM > Subject: Retrieve IP adress > > > > How I can retrieve the IP adress of my AS400 in a CL program ? > > > > regards > > > > Eric Panissard > > IDT > > > > > > _______________________________________________ > > 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-Lfirstname.lastname@example.org > > Before posting, please take a moment to review the archives > > at http://archive.midrange.com/midrange-l. > > > > > _______________________________________________ > 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-Lemail@example.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.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.