05-01-2017 03:43 PM
I'm new to SAS studio and I'm having a problem opening an .stc file. I never had a problem opening this file until switching over to SAS studio. How do I go about importing/opening the file?
05-01-2017 03:58 PM
Yup, that's what I tried first. Here's what I happened:
05-01-2017 05:55 PM
First PROC CPORT is used to CREATE cport files. If you want to read one you need to use PROC CIMPORT.
Second the file needs to be in a location that the SAS program can read. Your logs is clearly showing that you are trying to reference a file using Windows filename (and most likely on the personal computer) and your SAS session is running on a Unix machine.
If you are using SAS University Edition the make sure to but the file into a folder that you mapped into the virtural machine that is runnng SAS. If you are running SAS/Studio on some physical Unix machine then put the file into a folder on that machine (or a drive that is mounted on that machine.) You could try using the SAS/Studio interface to upload the file from your PC as long as it is not too large.
Once you have copied it somewhere SAS can see then run code like this to convert it into a data set. You should proabably save it as a SAS dataset to avoid having to run this step everytime you want to use it.
proc cIMport infile = '/folders/myfolders/sppa1982-2012_nw.sas7bdat/35588-0004-Data.stc' lib=work ; run;
05-01-2017 04:55 PM
Because SAS Studio is likely running on a server not on your desktop. So you need to upload it first to somewhere SAS Studio can see the file and then it will import it as it did previously.
You're switching to a desktop environment to a server environment which has its pros/cons. What you're seeing is one of the learning curves.