Hi,
I tried to find the meaning of $ sign inside the following quotes.
libname name '$CUSTOMER'
In my SAS class, I was taught physical location is specified inside the quotes.
I explored SAS documentation but could not get a clear understanding.
Could anyone of you help me?
Thanks
Mirisage
I think you've answered your own question. $CUSTOMER is the host OS (operating system) folder or directory name. I would not call it "physical" because it's pretty abstract vis a vis the hardware implementation of the OS filespace.
Only if your OS disallows dollar signs in file names is there a mystery.
Here's a Windows XP example.
options noxwait xsync ;
x cd c:\temp ;
x mkdir $CUSTOMER ;
libname name '$CUSTOMER' ;
data name.test ;
run ;
libname name clear ;
Fernando wrote:
Hi,
I tried to find the meaning of $ sign inside the following quotes.
libname name '$CUSTOMER'
In my SAS class, I was taught physical location is specified inside the quotes.
I explored SAS documentation but could not get a clear understanding.
Could anyone of you help me?
Thanks
Mirisage
Hi Fernando,
Is your SAS program running on a UNIX server? If so then CUSTOMER may be an environment variable and $CUSTOMER will be replaced with its value, hopefully the path to a directory containing SAS tables. For example on my server the following assigns a library to my home directory because HOME is a UNIX environment variable that points to my home directory /home/paul for example:
libname home '$HOME';
I also get to see what $HOME was in the SAS log's NOTE: message when the code is submitted. Another way to determine the value of an environment variable is to use %sysget like so:
%put %sysget(CUSTOMER);
Cheers
Paul
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.