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