BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Sarah-R
Obsidian | Level 7

Hi,

 

When I use the libname statement with elipses (..) it does not work.

This is the code I used:

libname raw "../raw";

I get the following result:

NOTE: Library RAW does not exist.

 

 

When I use the full path, it does create the library.  I used the code:

libname raw2 "C:/Users/jessica/Desktop/project1/subproject2/raw";

I get result:

NOTE: Libref RAW2 was successfully assigned as follows:

Engine: V9

Physical Name:

 

Any support would be appreciated.  Let us hope this is solvable!

1 ACCEPTED SOLUTION

Accepted Solutions
6 REPLIES 6
CarmineVerrell
SAS Employee

You need to have only one period not two.

CarmineVerrell
SAS Employee
libname raw "./raw";
Sarah-R
Obsidian | Level 7

Thank you, Carmine. 

Does it sometimes work with two (..), and sometimes work with one (.)?  Or should it only work with one (.)?

CarmineVerrell
SAS Employee

Using one period is a programming trick to make it easier to point to the default directory within the libname statement. You can only use one period not two. If you change the default directory then your code won't work anymore so it a better programming practice to have the entire path in the libname statement. 

 

CarmineVerrell_0-1620931593796.png

 

Sarah-R
Obsidian | Level 7

I cannot believe that was it!  I would never have got it on my own.  Thank you.

Sarah-R
Obsidian | Level 7
Great illustration.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 6 replies
  • 1190 views
  • 2 likes
  • 2 in conversation