LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (January 2007, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 10 Jan 2007 16:47:28 -0600
Reply-To:     "Gregg P. Snell" <gsnell@DATASAVANTCONSULTING.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Gregg P. Snell" <gsnell@DATASAVANTCONSULTING.COM>
Organization: Data Savant Consulting
Subject:      Re: SAS Get computer name
Comments: To: Venky Chakravarthy <swovcc@HOTMAIL.COM>
In-Reply-To:  <200701102238.l0AMTkUv028269@mailgw.cc.uga.edu>
Content-type: text/plain; charset=us-ascii

Venky,

From the online doc:

Syntax SYSGET('environment-variable')

and 'hostname' is a command, not an environment variable. That is why the pipe works.

Regards, Gregg Snell

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Venky Chakravarthy Sent: Wednesday, January 10, 2007 4:38 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: SAS Get computer name

On Wed, 10 Jan 2007 17:14:10 -0500, Fehd, Ronald J. (CDC/CCHIS/NCPHI) <rjf2@CDC.GOV> wrote:

>> From: webonomic > >> I've been trying to find how to get the value of my computer name >> (for windows machines). I think it has something to do with system >> functions. >> >> All I found so far is how to get the system environment using >> >> &sysscpl >> >> Can anyone please let me know how to get the value of a windows >> computer name? Anyone have any resources or cheat sheets with >> similar functions / variables / options that they can point me to? > >and from within sas: > >%Put computername<%sysget(computername)>; > >Ron Fehd the e-var maven CDC Atlanta GA USA RJF2 at cdc dot gov

Interesting. I was under the impression that HOSTNAME is the O/S command for Windows to get the computername. However it puzzles me as to why

%Put computername<%sysget(hostname)>;

fails while the following works.

filename getinfo PIPE "hostname" ; data _null_ ; infile getinfo ; input ; put _infile_ ; run ;

If I change HOSTNAME to COMPUTERNAME in the filename statement, the data step fails.

Why? Anyone?

Venky Chakravarthy


Back to: Top of message | Previous page | Main SAS-L page