Write and run SAS programs in your web browser

SAS University Edition Studio "physical file does not exist" error after using advice from other pos

Reply
New User
Posts: 1

SAS University Edition Studio "physical file does not exist" error after using advice from other pos

I have just started using SAS and tried to use the "Import XLSX" snippet to import my XLSX datafile.  I have created a folder within "myfolders" called "CH2" and have uploaded my xlsx file there.  I then filled in the relevant information using the tutorial on the SAS help website and then read a bunch of posts on here about similar problems.  However, no matter what I do, I continue to get the same error.  I'm including a screenshot of how I had the code set up and a PDF of the log after running the code.  Any ideas how to fix this and get my data into SAS?  Thank you in advance!

Attachment
Grand Advisor
Posts: 10,062

Re: SAS University Edition Studio "physical file does not exist" error after using advice

It is best to just post the log information in a code box using the {i} forum menu icon that attaching a file (unless it very long)

 

PROC IMPORT DATAFILE="<folders/myfolders/CH2/overtimesas.xlsx>"

where did the < and > characters come from? I would expect

 

PROC IMPORT DATAFILE="/folders/myfolders/CH2/overtimesas.xlsx"

 

Note the full error message

ERROR: Physical file does not exist, /opt/sasinside/SASConfig/Lev1/SASApp/<folders/myfolders/CH2//overtimesas.xlsx>.

If you use windows explorer to go to that location do you see anything named with <folders???

 

I would suggest exploring the TASKS for import data and see the code generated for comparison

Grand Advisor
Posts: 16,924

Re: SAS University Edition Studio "physical file does not exist" error after using advice

You can right click a file in the Files/Folders Section, select properties and the exact path you will need to use is in that menu. 

You can copy and use that. 

 

 

Esteemed Advisor
Posts: 6,309

Re: SAS University Edition Studio "physical file does not exist" error after using advice

You will VERY rarely find a '<' or '>' in a UNIX filename, as these characters have special meaning in the shell as in/output recdirectors.

So they were used to mean 'insert your path here' in the documentation.

Also keep in mind that any pathname that doesn't start with a forward slash is considered relative to the current working directory and will usually lead into the great nowhere.

---------------------------------------------------------------------------------------------
Maxims of Maximally Efficient SAS Programmers
SAS Employee
Posts: 50

Re: SAS University Edition Studio "physical file does not exist" error after using advice

Hi @rieckl,

 

There is a topic about importing data in the FAQ here: How do I import data from a raw data file, a Microsoft Excel worksheet, or a DBMS file? 

Click on Snippets at the top to view instructions for using the Import XLSX File snippet.  In Step 2 of the instructions, there is an explanation for Line 3 of the snippet that shows examples of how to specify the XLSX filename.

 

Hope that helps!

thanks,

Jennifer

 

Ask a Question
Discussion stats
  • 4 replies
  • 79 views
  • 0 likes
  • 5 in conversation