Date: Mon, 29 Jul 2002 14:40:05 GMT "Michael G. Sadof" "SAS(r) Discussion" "Michael G. Sadof" Re: !sasroot

Actually the pathname works better because it will fully resolve the path. I was also trying to get to the 'SASUSER' path as defined in the config.cfg file. I need to evaluate this to perhaps reassign libraries with the autoexec.sas file in the users' directly. With Win200 or NT SAS defines the SASUSER directory into the 'my documents' folder of the individual user. So when you execute the code:

%put Starting Sas from %sysfunc(sysget(sasuser));

You get: Starting Sas from ?CSIDL_PERSONAL\My SAS Files

What I really want is: %put Starting Sas from %sysfunc(pathname(sasuser))

Starting SAS from C:\Documents and Settings\administrator\My Documents\My SAS Files

"Peter Crawford" <peter.crawford@DB.COM> wrote in message news:OF663AD337.5739B116-ON41256C05.0035E922@db.com... > for reporting !sasroot, pathname() (as suggested > by "shiling zhang <shiling99@YAHOO.COM>" ) > suits me better because it fully resolves the path. > %sysget() returns only the text in the environment > variable > My !sasroot points to a folder using another > environment variable > > pathname(sasroot) adds sasroot to sashelp.vextfl > with the full drive and path > > 1 %put **%sysfunc(pathname(sasroot))**; > **C:\Program Files\SAS Institute\SAS\V8** > 2 %put **%sysget(sasroot)**; > **!codehere** > > > beware unix, where "sasroot" may need to be uppercase > 2 %put **%sysfunc(pathname(sasroot))**; > **/applications/sas/sasv81** > 3 %put **%sysget(sasroot)**; > WARNING: The argument to macro function %SYSGET is not defined as a system variable. > **** > 4 %put **%sysget(SASROOT)**; > **/applications/sas/sasv81** > However the case is clearly less important for pathname() > > > Of course, if it is the actual setting of the environment > variable !sasroot, that is needed, perhaps you > would not want any environment variable it contains > to be resolved further .... > > .... then %sysget() is necessary ! > > > Regards > Peter Crawford > > > > Datum: 27/07/2002 21:42 > An: SAS-L@LISTSERV.UGA.EDU > > > > > Antwort an: shiling zhang <shiling99@YAHOO.COM> > > Betreff: Re: !sasroot > Nachrichtentext: > > The pathname may work fine across the platform. > > %put %sysfunc(pathname(sasroot)); > > > "Richard A. DeVenezia" <radevenz@ix.netcom.com> wrote in message news:<ahsk4j\$8o1\$1@slb4.atl.mindspring.net>... > > "Lex Jansen" <news@UNSPAMlex-jansen.demon nl> wrote in message > > news:uk3broe7m15hf4@corp.supernews.com... > > > Michael, > > > > > > Try this: %sysfunc(sysget(sasroot)) > > > > > > Regards, > > > Lex Jansen > > > > > > "Michael G. Sadof" <mgs@mgsnet.net> wrote in message > > > news:R0i09.1378\$NX5.463@nwrddc02.gnilink.net... > > > > Hello All: How do you get the value of !sasroot or other configuration > > > > variables into you sas program under windows. > > > > > > > > > > For sysget()'ing, there is also a macro function. > > %sysget (SASROOT) > > > > > > -- > > Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet. > > This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

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