Date: Sun, 30 May 2010 08:45:18 -0600
Reply-To: Alan Churchill <alan.churchill@SAVIAN.NET>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Alan Churchill <alan.churchill@SAVIAN.NET>
Subject: Re: Retrieve host IP address
Content-Type: text/plain; charset="us-ascii"
Birdie post:
In SAS 9.2 I believe that this information is stored on an automatic macro
variable. Try:
%put _AUTOMATIC_;
Alan
Alan Churchill
Savian
Work: 719-687-5954
Cell: 719-310-4870
-----Original Message-----
From: Jesper Sahner [mailto:jespersahner@HOTMAIL.COM]
Sent: Friday, May 28, 2010 11:53 PM
Subject: Re: Retrieve host IP address
Hi Joe,
Thanks, this solves it.
However - and this is another problem - there is a security problem (access
denied) when the code is submitted (rsubmit) to a server.
Regards,
Jesper
Date: Fri, 28 May 2010 04:28:35 -0500
Subject: Re: Retrieve host IP address
From: snoopy369@gmail.com
To: jespersahner@hotmail.com
CC: SAS-L@listserv.uga.edu
One option: put it into a pipe file.
filename a pipe 'ping myhost';
then read it from that.
So:
filename a pipe 'ping yahoo.com';
data test;
infile a lrecl=200 pad;
format test $200.;
input
@1 test $200.;
run;
I think ping is probably not the optimal function for this though -
nslookup on windows for example is better.
-Joe
On Fri, May 28, 2010 at 4:02 AM, Jesper Sahner Pedersen
<jespersahner@hotmail.com> wrote:
Hi,
How can I retrieve a host IP address?
The following works:
data _null_;
call system('ping myhost');
run;
- but how can I retrieve the host IP address into e.g. a macro variable?
Regards,
Jesper