BookmarkSubscribeRSS Feed
Fernando
Calcite | Level 5

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

2 REPLIES 2
Howles
Quartz | Level 8

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

PaulHomes
Rhodochrosite | Level 12

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

sas-innovate-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

Register now

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1435 views
  • 0 likes
  • 3 in conversation