Hello,
How do I mask special characters when generating a pdf file in Unix directory. My file name comes from a macro parameter.
data test;
file_name="Test/File";
run;
/* Also files can have unclosed single quote or & or % */
proc sql;
select file_name into: file
from test ;
quit;
ods pdf file="/usr/&file..pdf";
proc print data=sashelp.class;
run;
ods pdf close;
%nrstr() works fine, but when I have '/' it doesn't mask and throws error Physical file doesn't exist. ('/' is treating as another directory in Unix)
I don't think this is a SAS issue. You cannot make a file with a slash in its name.
What name do you want to use instead?
I don't think this is a SAS issue. You cannot make a file with a slash in its name.
What name do you want to use instead?
Disregard this, I totally forgot that file names with '/' can't be created. sometimes I am dumb
Available on demand!
Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.
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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: