|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>|
|From: ||Don Henderson <donaldjhenderson@HOTMAIL.COM>|
|Subject: ||Re: !SASROOT resolution|
|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?
Author of the SAS Press book "Building Web Applications with SAS/IntrNet(c):
A Guide to the Application Dispatcher"
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
Subject: Re: !SASROOT resolution
> From: email@example.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?
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
-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