Agree with Astounding %put _user_ could help. And also a good suggestion to back off a bit on the macro quoting, unless you have special need for note. Was going to suggest adding %unquote(), but since you use %SYSFUNC not %QSYFUNC all the quoting is removed at that point.
Here is what I see, cant see the slash anywhere. You can see the quoting that was applied to &Separator and &datafile.
16 %let Datafile=%str(pippo3.xlsx); 17 %let raw=/sasdata/Projects/share/AGSourcingExcelTool/Superuser; 18 %let separator = %str(/); 19 %let aa= %sysfunc(catx(&separator,%nrstr(%superq(raw)),%nrstr(%superq(Datafile)))); 20 %put _user_; GLOBAL SEPARATOR GLOBAL RAW /sasdata/Projects/share/AGSourcingExcelTool/Superuser GLOBAL AA /sasdata/Projects/share/AGSourcingExcelTool/Superuser/pippo3.xlsx GLOBAL DATAFILE pippo3.xlsx
Hi:
When I try your code (even though I do not think you need the CATX function), I do not get double slashes with either your complex example or any of the simple alternatives (using SAS 9.4).
cynthia
Are you absolutely sure that the path works (eg copy it into a cd statement in telnet and the see if ls shows the file)? With that many capital letters there may be an error hiding.
Double slashes are usually compressed to single slashes by UNIX.
I rarely do more than filename xx "&path./&file"; and have no problems.
Not to resurrect a thread, but I've got another piece of data on this:
%let crmms4dt=20140915;
%let crmms2dt=20140811;
%let datadir=/hli/ims/nbtz3jg/sla/prod/data/;
PROC IMPORT OUT=crm_ms4
DATAFILE= "&datadir.Cumulative SLA Research Reports/Cum SLA Research Report &crmms4dt..xlsx"
DBMS=XLSX REPLACE;
SHEET="LLD";
GETNAMES=YES;
MIXED=NO;
RUN;
proc import out=crm_assign_request_9b
DATAFILE= "&datadir.Trigger To Case Create Date/Dashboard CRM Daily &crmms2dt..xlsx"
DBMS=XLSX REPLACE;
SHEET="9B";
GETNAMES=YES;
MIXED=NO;
RUN;
The first one works and the second one doesn't, failing with the double slash file name error message.
This bug still is not fixed.
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.