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

Hi everyone,

 

I'm very new to SAS and Enterprise Guide--this is my second week using it. I'm using SAS on a VM and once I use the Import Wizard to open a csv file, I copy the code the wizard generates and proceed with figuring out basic data cleaning tasks. The next day when I open the program, I get an error that the physical file does not exist. It existed yesterday and everything worked fine. 

 

I'm coming from an SPSS background and I'm just looking to write a syntax/program that I can run over and over at different points in the future.

 

Does anyone know what is causing this error? Do I need to use the Import Wizard every time I need to open a file? Can nothing be repeatable?

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

It depends. One way is to import the data once and then store it in a permanent library rather than read it in each time. 

 

I usually add the import at the code, then once it's read in properly I comment it out and then use the data from a permanent library.

 

libname projPP '/folders/myfolders/ProjPP/';

*proc import out=ProjPP.RawData datafile='/folders/myfolders/ProjPP/demo.csv dbms=csv replace; 
*run;

data RawData;
set projPP.rawdata;
run;

The issue you may be facing, is the file is local but your EG is actually running off a server, so if you try and run the program it no longer has access to the file. The mechanism of importing a local file when you're working with EG on a servers is very different and takes some research to understand. 

 

Basically EG is a thin client that connects to the server. You can also use local data but you can't stream line the use of local data 😞

If you're using local data the best bet is to load the file to the server and then you can automate the full process. 

 

Using a server environment is more of a difficult transition than switching tools. So you have the factor that you're working with a new tool and a different data set up at once. 

View solution in original post

2 REPLIES 2
Reeza
Super User

It depends. One way is to import the data once and then store it in a permanent library rather than read it in each time. 

 

I usually add the import at the code, then once it's read in properly I comment it out and then use the data from a permanent library.

 

libname projPP '/folders/myfolders/ProjPP/';

*proc import out=ProjPP.RawData datafile='/folders/myfolders/ProjPP/demo.csv dbms=csv replace; 
*run;

data RawData;
set projPP.rawdata;
run;

The issue you may be facing, is the file is local but your EG is actually running off a server, so if you try and run the program it no longer has access to the file. The mechanism of importing a local file when you're working with EG on a servers is very different and takes some research to understand. 

 

Basically EG is a thin client that connects to the server. You can also use local data but you can't stream line the use of local data 😞

If you're using local data the best bet is to load the file to the server and then you can automate the full process. 

 

Using a server environment is more of a difficult transition than switching tools. So you have the factor that you're working with a new tool and a different data set up at once. 

JenniferLB08
Fluorite | Level 6

@Reeza Thank you so much for your quick and helpful response! It makes sense that the issue would be that the file is local and EG is on a server. I'll look into the library recommendation you posted and see what I do to make working with it a bit easier. You are correct, getting used to a new tool and different data set up at the same time is a fun layer of complexity. Thanks again!

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 6770 views
  • 1 like
  • 2 in conversation