- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@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!