DATA Step, Macro, Functions and more

Help with 'infile' in SAS university

Accepted Solution Solved
Reply
New Contributor
Posts: 3
Accepted Solution

Help with 'infile' in SAS university

Hi all!

 

I've been trying to open a file for the past hour, and it's driving me crazy.  I have a file called 'temp3.txt' with the address

 

'C:\SASUniversityEdition\myfolders\temp3.txt'

 

and I tried to use the inline command to open this in SAS UE with the '/folders/myfolders/...' path:

 

DATA temp3;
	infile '/folders/myfolders/temp3.txt';
	input subj 1-4 gender 6 height 8-9 weight 11-13;
RUN;
PROC PRINT data = temp3;
	title 'Output dataset: TEMP3';
RUN;

But I when I run this code, I get an error message saying

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
55
56 DATA temp3;
57 infile '/folders/myfolders/temp3.txt';
58 input subj 1-4 gender 6 height 8-9 weight 11-13;
59 RUN;
 
ERROR: Physical file does not exist, /folders/myfolders/temp3.txt.

 

 

What am I doing wrong?


Accepted Solutions
Solution
‎04-08-2016 09:18 PM
Super User
Posts: 17,963

Re: Help with 'infile' in SAS university

Probably don't need to reinstall. Myfolders is all lower case? Set up in VM? 

Try restarting VM?

View solution in original post


All Replies
Super User
Posts: 17,963

Re: Help with 'infile' in SAS university

1. Double check that your myfolders is set up properly. If the following runs correctly it is. 

Libname test '/folders/myfolders'
Super User
Posts: 17,963

Re: Help with 'infile' in SAS university

2. Make sure your file is properly referenced - it is case sensitive. 

Sorry about two posts. Slight issue posting

 

 

New Contributor
Posts: 3

Re: Help with 'infile' in SAS university

[ Edited ]

Thank you for the reply.  When I run your code, it does give me an error saying "Libref TEST is not assigned".

However, I checked my virtual machine setting:

 

1) Shared Folders is set to "Enabled", and

 

2) The host path "C:\SASUniversityEdition\myfolders" is added under the name "myfolders" (in "Folder sharing" tab).

 

Yet it still does not work.  Do you think I should just re-install the program?

Solution
‎04-08-2016 09:18 PM
Super User
Posts: 17,963

Re: Help with 'infile' in SAS university

Probably don't need to reinstall. Myfolders is all lower case? Set up in VM? 

Try restarting VM?

New Contributor
Posts: 3

Re: Help with 'infile' in SAS university

It started working after I restarted the VM twice.  Wow, thank you so much!  Smiley Happy

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 5 replies
  • 313 views
  • 0 likes
  • 2 in conversation