Date: Mon, 8 Nov 1999 12:36:27 GMT
Reply-To: Huck <huck@FINN.EXTRA..COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Huck <huck@FINN.EXTRA..COM>
Subject: Re: Getting IP adress dynamically.
i think netstat might be the easiest, but may produce more lines of
netstat -an >junk.txt
On 2 Nov 99 19:03:03 GMT, raymondk@MOCR.OAPI.COM (King, Raymond)
>I seem to recall a similar question from a year or so ago.
>I think you can use the ARP command and redirect the output to a file.
> arp -a > arpdata.txt
>You read the file in SAS and then extract the IP address from the specific
>line # and position in a data step and assign it to a macro variable before
>doing your download.
>> -----Original Message-----
>> From: Rob Rohrbough [SMTP:Rob@ROHRBOUGH-SYSTEMS.COM]
>> Sent: Tuesday, November 02, 1999 1:37 PM
>> To: SAS-L@LISTSERV.UGA.EDU
>> Subject: Re: Getting IP adress dynamically.
>> Not sure if WINIPCFG will write to a file. It does have a control menu
>> option to copy to the clipboard. There may be a command line parameter
>> you can use to trigger this option from an X command. Then you would have
>> to programmatically read the clipboard from SAS.
>> Another option to think about is the Windows SDK. WINIPCFG gets its
>> information from somewhere - probably via a Windows API. Conceivably, you
>> could find the API call and write a DLL in C or another language to return
>> the IP address dynamically to SAS.
>> Not everyone would want to resort to this - just a thought,
>> Paul Kairis wrote:
>> >Can you write the output of the WINIPCFG to a temp file and then read
>> >that file and extract the IP info ...
>> > -----Original Message-----
>> > From: Pieter Kirsten [mailto:Ben-de.Gooijer@CORP.AH.NL]
>> > Sent: Monday, November 01, 1999 2:51 AM
>> > Subject: Getting IP adress dynamically.
>> > I have a SAS/AF program that runs in the MVS environment. Itīs
>> > purpose is to
>> > create 4 flat files that needs to be downloaded. At the moment
>> > the user must
>> > input the IP adress every time it is used by running WINIPCFG and
>> > seeing what
>> > the current IP adress is. The program will then use this information and
>> > download it from MVS to his PC. The user has Windows 95 at the moment.
>> > My question is if there is a way that I can retrieve the IP
>> > adress automatically
>> > as it is dynamically created each day. Maybe combining the X
>> > command with some
>> > Dos commands or a small dos program. Can someone direct in the
>> > right direction
>> > or stop me if I am wasting my time.
>> > Thanks
>> > Pieter Kirsten