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.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.