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 (August 2007, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Wed, 1 Aug 2007 15:47:21 -0400
Reply-To:   Don Henderson <donaldjhenderson@HOTMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
Comments:   RFC822 error: <W> MESSAGE-ID field duplicated. Last occurrence was retained.
From:   Don Henderson <donaldjhenderson@HOTMAIL.COM>
Subject:   Re: !SASROOT resolution
In-Reply-To:   <2C6B65AAC3623140922DE580669C456A0154AA4A@LTA3VS001.ees.hhs.gov>
Content-Type:   text/plain; charset="us-ascii"

Permit me to echo Ron's sage advice to NOT write things to the SAS install directory. In general it is a very bad idea to put anything in the SAS install directories (which can get blown away by a reinstall, etc.).

Also, I am curious as to whether this is for a SAS/IntrNet App Dispatcher application since you reference "intrnet" as part of your file path. If so, are you aware that if you want the value to be available to the running programs your %let statement will have to go into the program specified in your REQUEST INIT statement?

hth, Don Henderson Author of the SAS Press book "Building Web Applications with SAS/IntrNet(c): A Guide to the Application Dispatcher" http://www.sas.com/apps/pubscat/bookdetails.jsp?pc=60282 http://www.sascommunity.org/wiki/Building_Web_Applications_with_SAS/IntrNet: _A_Guide_to_the_Application_Dispatcher

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Fehd, Ronald J. (CDC/CCHIS/NCPHI) Sent: Wednesday, August 01, 2007 3:28 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Re: !SASROOT resolution

> From: adac1121@gmail.com > I have a question, I guess I know the reason but like to know the > technical aspects: > > !SASROOT resolved in Filename and ODS section but didn't work in %let > statement? The difference between SASROOT and !SASROOT (logical name) > > %let _home=%trim(%sysget(SASROOT))/intrnet; > ***here must use %sysget to get the SASROOT value?

> ***why can't use !SASROOT in the above statement?

you can: %let home=!SASROOT/intrnet;

filename root "&home.";

filename root list;

of course, you do

>>>---> NOT <---<<<

want to be writing files into folders under your sas installation!

> libname root "!SASROOT/reports/"; > filename inout "!SASROOT/reports/"; > libname or ods or filename will resolve to the value of !SASROOT which > is /opt/app/intrnet.

sasroot is set in your Win config file sasv9.cfg

-set sasroot '<folder>'

-set is the verb for allocating an environmental variable

the reference is prefix: ! bang or exclamation point name of environment variable suffix: not needed,

as a folder name the next special character will be a slash so that terminates the reference.

environmental variable references can be used in sas statements but that is not A Good Idea: talk to your operating system only in configuration files

Ron Fehd the macro maven CDC Atlanta GA USA RJF2 at cdc dot gov


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