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
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.