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!
You need to have only one period not two.
Thank you, Carmine.
Does it sometimes work with two (..), and sometimes work with one (.)? Or should it only work with one (.)?
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.
I cannot believe that was it! I would never have got it on my own. Thank you.
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!
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.