Hi experts,
I am struggling assigning a SAS libname because the url has special character '&' . The code truncates and attend to assign '\\myserver\folder1\folder2\01_' url which does not exists.
LIBNAME sample "\\myserver\folder1\folder2\01_&folder3\";
How to handle url with special characters in this case?
Thanks in advance.
OK, try:
LIBNAME sample %nrstr("\\myserver\folder1\folder2\01_&folder3\");
Bart.
If it's URL, maybe try %26
LIBNAME sample "\\myserver\folder1\folder2\01_%26folder3\";
?
Bart
OK, try:
LIBNAME sample %nrstr("\\myserver\folder1\folder2\01_&folder3\");
Bart.
The & character has special meaning for operating systems (e.g. send a command to the background in UNIX), therefore it has NO PLACE AT ALL in file or directory names. Correct that three days before yesterday.
Otherwise, simply use single quotes to prevent SAS from attempting to resolve a macro variable.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.