BookmarkSubscribeRSS Feed
David_Billa
Rhodochrosite | Level 12

What would be the likely cause for this issues? File is available in respective location.

 

proc import 
datafile="/share/sasdata/analytics/INPUT/2019_SUBMISSION_07_31_2019.xlsx" 
dbms=xlsx 
out=work.FSU
replace;
RANGE="Sheet1$C7:AG50000";
run;

Error:

 

Why extra slash '/' is being shown before the filename in log?

 

ERROR: Physical file does not exist, /share/sasdata/analytics/INPUT//2019_SUBMISSION_07_31_2019.
NOTE: The SAS System stopped processing this step because of errors.
8 REPLIES 8
Kurt_Bremser
Super User

The extra slash is an issue of the ERROR display (UNIX would collapse two successive slashes to one on its own, anyway).

Check your spelling (upper/lowercase), and retype the whole filename from scratch. You may have an un-displayable character in there which confuses the file interface (because the .xlsx extension is missing).

In particular, be careful when using macro variables. They may contain an invisible macro token.

David_Billa
Rhodochrosite | Level 12

@Kurt_Bremser Still the same error even after manually typed the file name. I'm not certain how to resolve this issue now.

andreas_lds
Jade | Level 19

You have checked the spelling? The directory is really named INPUT, not "input"? The filename has only uppercase letters?

David_Billa
Rhodochrosite | Level 12

Folder which I posted is right. I could import the file if I use Import Wizard after placing the file in desktop.

Kurt_Bremser
Super User
The path on your desktop is not guaranteed to be available on the SAS server. Talk with your SAS admins if and how the share is mounted on the SAS server.
Sajid01
Meteorite | Level 14

The error is clear. SAS is not able to locate the file.
A gentle reminder Unix is case sensitive.
Another thought is the /share folder on the root of filesystem?

David_Billa
Rhodochrosite | Level 12

Another thought is the /share folder on the root of filesystem? Yes

Kurt_Bremser
Super User

Run this:

data files;
length dref $8 name $200;
rc = filename(dref,"/share");
did = dopen(dref);
if did
then do;
  do i = 1 to dnum(did);
    name = dread(did,i);
    output;
  end;
  rc = dclose(did);
end;
else putlog "Directory is inaccessible";
rc = filename(dref);
keep name;
run;

and look if your next subdirectory is found; if yes, repeat for it, until you arrive at your file.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 8 replies
  • 1824 views
  • 3 likes
  • 4 in conversation