BookmarkSubscribeRSS Feed
saslove
Quartz | Level 8

libname mylib '.'

What does the "DOT" mean in the above libname statement? 
Even after I shut down SAS and re-open and re-run my code for another study, the mylib remembers the datasets from the previous study/run? Why does this happen? Thoughts? 

4 REPLIES 4
ballardw
Super User

The part in quotes for a LIBNAME statement is path on your computer. '.' would reference some relative location based on your set up.

Your log should actually have the path associated.

 

For instance when I create a similar library:

20   libname junk '.';
NOTE: Libref JUNK refers to the same physical library as WORK.
NOTE: Libref JUNK was successfully assigned as follows:
      Engine:        V9
      Physical Name: C:\SASTemp\_TD13916_CWPP0527_

Which in my case indicates it is the same library as work. You might want to check on the part of the log that follows: Physical Name: for the complete path. Depending on your configuration the path could be quite different. I suspect yours does not point to the same location as your work library if the data sets are still found after closing SAS and restarting.

Reeza
Super User
I'm guessing someone set it up at some point as a permanent library. Have you tried deleting the permanent library first and then seeing if it is recreated once you delete it?
Kurt_Bremser
Super User

@Reeza wrote:
I'm guessing someone set it up at some point as a permanent library. Have you tried deleting the permanent library first and then seeing if it is recreated once you delete it?

I guess that attempt would fail. As long as SAS uses the directory as its Current Working Directory, you can't remove it. Both on Windows and UNIX..

FreelanceReinh
Jade | Level 19

Hi @saslove,

 

Under Windows (and Unix) the dot refers to what is called the "current folder" (or "working directory," especially under Unix, but not to be confused with the WORK library).

 

There are various ways to change the physical location of that folder: see Changing the SAS Current Folder (for Windows) or Changing Your Working Directory in UNIX Environments. For Windows there is additional information about the default location in Determining the Current Folder When SAS Starts.

 

Personally, I don't use this folder as a library for SAS datasets because it wouldn't be project-specific, as you noticed.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 748 views
  • 0 likes
  • 5 in conversation