BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
nicwoyak
Obsidian | Level 7

I don't see what I am doing wrong that this error keeps occurring. See below my folder structure in the Explorer and the log with my code and the error. I used the right click "Insert as Path" function with the Explorer so there shouldn't be any typos with the path.

 

SASerrorlog.PNGSASExplorer.PNG 

1 ACCEPTED SOLUTION

Accepted Solutions
nicwoyak
Obsidian | Level 7

It's not the University Edition, it's a trial version of SAS Studio Viya. The files have been uploaded from my computer to the server.

 

I found what the issue is.

 

In older versions of SAS Studio that I have experience with, you simply uploaded file to the server and referred to them using the path expressed in the Explorer. With the new version of SAS Studio, there's an additional step after uploading, you have to create a file reference. Then instead of providing the path for the datafile argument of proc import, you provide the file reference name. The file references are made by right clicking on the file in the Explorer and selecting "Create file reference". So assuming I named my file reference "VEHICLES", the correct code is.

 

 

proc import DATAFILE="VEHICLES"
	OUT=Vehicles	
	DBMS=csv
	replace;
RUN;

Where previously it would have been:

proc import DATAFILE="/Users/nic.woyak@limolink.com/DSP/Vehicles2.csv"
	OUT=Vehicles	
	DBMS=csv
	replace;
RUN;

 

The documentation that helped with this:

http://support.sas.com/kb/63/855.html

 

View solution in original post

2 REPLIES 2
ballardw
Super User

Are you using SAS University Edition? If so the Path needs to be adjusted.

Are you running in a Server environment (you connect to a server to actually run SAS)? If so then the server does not see that path a connecting to your local computer and is attempting to find it on the server. You would need to place the data on a drive that the server can read from and reference that location in the file name.

 

Instead of going to the extra work of making pictures of editor or log items it is preferred that you copy code or log directly from the appropriate window and on the forum open a code window with the {I} or "running man" icon and paste the copied text.

The code box is important to maintain formatting.

 

The text is better because we can either highlight items or copy appropriate code and make suggested edits to demonstrate solutions or test code if we have example data.

nicwoyak
Obsidian | Level 7

It's not the University Edition, it's a trial version of SAS Studio Viya. The files have been uploaded from my computer to the server.

 

I found what the issue is.

 

In older versions of SAS Studio that I have experience with, you simply uploaded file to the server and referred to them using the path expressed in the Explorer. With the new version of SAS Studio, there's an additional step after uploading, you have to create a file reference. Then instead of providing the path for the datafile argument of proc import, you provide the file reference name. The file references are made by right clicking on the file in the Explorer and selecting "Create file reference". So assuming I named my file reference "VEHICLES", the correct code is.

 

 

proc import DATAFILE="VEHICLES"
	OUT=Vehicles	
	DBMS=csv
	replace;
RUN;

Where previously it would have been:

proc import DATAFILE="/Users/nic.woyak@limolink.com/DSP/Vehicles2.csv"
	OUT=Vehicles	
	DBMS=csv
	replace;
RUN;

 

The documentation that helped with this:

http://support.sas.com/kb/63/855.html

 

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 919 views
  • 0 likes
  • 2 in conversation