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

Hello,

 

I'm trying to read a simple text file; see below

 

Data Toads;
	Infile 'C:\SASUniversityEdition\myfolders\ToadJump.txt' dlm=' ';
	Input Toadname $ Weight Jump1 Jump2 Jump3;
Proc print data=toads;
	Title 'SAS Data Set Toads';
run;

I get back a message in the error log that it isn't reading the file.image.png

 

Why is the path so different from what I put in?

 

Thanks

 

Zemaxlight

1 ACCEPTED SOLUTION

Accepted Solutions
Kurt_Bremser
Super User

SAS UE is a virtual machine with a small UNIX operating system. To access files, you need to use UNIX-style syntax, and absolute (starting at the root) pathnames.

In order to get access to your desktop storage, you defined the shared folder, and this is found in UNIX as /folder/myfolders.

Your infile statement therefore has to be:

infile '/folders/myfolders/ToadJump.txt' dlm=' ';

Note that UNIX filesystems are case-sensitive.

View solution in original post

3 REPLIES 3
RW9
Diamond | Level 26 RW9
Diamond | Level 26

SAS University Edition runs on a virtual machine, which is separate to your actual computer.  You need to move the file to the shared folder, where this is depends on if your running virtual machine of Amazon:

https://support.sas.com/software/products/university-edition/faq/SAS_accessdata_Excel.htm

And shared folder:

https://support.sas.com/software/products/university-edition/faq/shared_folder_whatis.htm

Kurt_Bremser
Super User

SAS UE is a virtual machine with a small UNIX operating system. To access files, you need to use UNIX-style syntax, and absolute (starting at the root) pathnames.

In order to get access to your desktop storage, you defined the shared folder, and this is found in UNIX as /folder/myfolders.

Your infile statement therefore has to be:

infile '/folders/myfolders/ToadJump.txt' dlm=' ';

Note that UNIX filesystems are case-sensitive.

zemaxlight
Calcite | Level 5

Kurt, 

 

Thanks very much, that revised line did the trick.  Was really annoying banging my head against the wall trying to figure out what the right solution was without help.

 

Zemaxlight

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

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
  • 3 replies
  • 2193 views
  • 0 likes
  • 3 in conversation