Learning SAS? Welcome to the exclusive online community for all SAS learners.

Help with reading data into SAS

New Contributor
Posts: 2

Help with reading data into SAS

I am having trouble reading files into my SAS University edition program and was not able to find a solution online. I have attached the images and outputs below. Am I doing something wrong in my process? 



My shared folder is set to: C:\Users\dsvancer\Desktop\SASUniversityEdition\myfolders on my laptop (see screen shot below)

And this is the location I have saved my files (same as the shared folder):

Whenever I run code to pull the data into SAS, I get this error:


I have also tried INFILE 'folder\myfolders\kids.dat';  and INFILE 'kids.dat';


Super User
Posts: 23,700

Re: Help with reading data into SAS

Your images and code aren't coming through.

Super User
Posts: 13,523

Re: Help with reading data into SAS

My office's nannyware is blocking the images as they apparently have something in them that makes our software think they are actually email (links perhaps) and not image files in spite of the name assigned.

Super User
Posts: 23,700

Re: Help with reading data into SAS

They appear to be links to an Office 365 space?

Posts: 9,367

Re: Help with reading data into SAS

Hi, I can't see the images either. Here are some pointers that may help you:

1) you cannot use a C: drive location in your University Edition path name

2) you cannot use "Windows" slashes (\) in a path reference

3) you must use "Unix" slashes (/)

4) IF (and apparently this is a big IF) you have defined shared folders, and a myfolders location, then no matter what your high level path is:

c:\SASUniversityEdition\myfolders\newdir OR


the path on the UE will be EXACTLY the same: /folders/myfolders/newdir Note how the high level part of the local path before the  "myfolders" part of the path resolves to /folders/myfolders

5) the leading / in the path name is significant:

This would be correct INFILE '/folders/myfolders/kids.dat';

this is NOT correct INFILE 'folders/myfolders/kids.dat'; (must have a leading slash)

this is really NOT correct: INFILE 'c:\Users\dsvancer\Desktop\SASUniversityEdition\myfolders\kids.dat';

6) If you have not created shared folders, as needed by your Virtual Machine software then you have to do that before anything will work.

There have been many previous Forum postings on the need for the / slash and how you cannot use a C: drive path and how to issue both an INFILE and a LIBNAME statement when you are using the UE with shared folders. If you right click on a folder under your shared folder location and click Properties, SAS Studio will show you the Unix name that you have to use for that folder. So there is an easy way to equate your physical location with a Unix location that's needed...

Good luck reading your data file.


New Contributor
Posts: 2

Re: Help with reading data into SAS

Posted in reply to Cynthia_sas

Thank you, Cynthia! I was able to read my data into SAS with INFILE ' /folders/myfolders/kids.dat'

Ask a Question
Discussion stats
  • 5 replies
  • 4 in conversation