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 2008, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Mon, 28 Jan 2008 05:23:48 -0800
Reply-To:     Peter <crawfordsoftware@GMAIL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Peter <crawfordsoftware@GMAIL.COM>
Organization: http://groups.google.com
Subject:      Re: Windows installation directory
Comments: To: sas-l@uga.edu
Content-Type: text/plain; charset=ISO-8859-1

On 27 Jan, 15:38, art...@NETSCAPE.NET (Arthur Tabachneck) wrote: > Mehdi, > > I'm sure there is a more direct way to code it, but I think the following > might capture what you are looking for: > > data _null_; > %let percent=%nrbquote(%); > filename sr pipe "echo &percent.systemroot&percent."; > infile sr lrecl=300 truncover; > input @1 sr $100.; > %let sr=sr; > put &sr.; > run; > > HTH, > Art > --------- > On Sun, 27 Jan 2008 00:49:32 -0500, Mehdi Soleymani > > > > > > <mehdi_soleym...@SOFTHOME.NET> wrote: > >How can I retrieve Windows installation directory. for example I want > have a > >variable which contains windows installation directory, for example: > >rc="C:\Windows"- Hide quoted text - > > - Show quoted text -

try %put %sysget(sasroot) ;

The environment variable name is case sensitive on Unix platforms. Review all environment variable names and values in data step( except on EG with default NOXCMD option)

(untested) data evars( compress= yes ) ; length name $32 value $200 ; filename pevars pipe 'set ' lrecl= 2000 ; infile pevars truncover dlm='=' col= col; input name @; if name ne ' ' ; value = substr(_infile_, col ); put name= / value /; run;

PeterC


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